App Router Middleware Dynamic External Redirect #65953
Unanswered
Logannford
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I have a multi-tenant application that needs to redirect a user that hits
[subDomain].[baseUrl]/admin
tobaseUrl/admin?r=admin&...]
.I cannot use
req.url
as that is not the domain I want to hit.I also need to allow this to work in both development and production environments. So hardcoding a URL isn't really an option.
Additional information
I have this method:
Here is
getEnv()
Used here:
console logging the value returned the correct value - the redirect still goes to the req.url regardless
Could this be an issue regarding redirects to external URLs on HTTP? Hardcoding the baseUrl to my production sites seems to work fine...
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions