url manipulation in RodauthApp > configure > prefix #193
-
I'm trying to dynamically change the prefix based on the Accept-Language header, so currently i have
but i would need something like this:
I think i can use the AcceptLanguage gem to parse the header, but i don't have access to env here. it's accessible in the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The |
Beta Was this translation helpful? Give feedback.
The
configure
block is executed immediately, but the individual auth method blocks are executed only when calling Rodauth, which happens during the request. The Rodauth object is initialized with the Roda instance, so you have access to the current request. You can access the env via therequest
object, i.e.request.env
.