-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NextJS i18n cannot redirect based on domain, Amplify should forward "X-Forwarded-Host" header #2340
Comments
I've literally been on this issue for 3 days, it's the worst possible service to deploy a Next (SSR) application, honestly. I have to do X applications per domain and run with an environment variable to indicate the current domain. :introducing-facepalm-here: |
Hi folks, any news about domain routing with Amplify? Theres some way we can work around it by ourselves in the meantime (without having to work with multiple branches or applications of the same code)? Issue #2345 has the same problem. |
We will celebrate 1 year with that and the #2345 issues without ANY solution, explanation, or workaround, that's sad. |
You are announcing Next13 support now. This is an old unsolved bug, not a feature request. |
up |
We ran into the same issue where it just redirects to the default domain. They clearly state that it should be supported, but it doesn't seem to work out of the box with no further documentation. We are now forced to deploy each language as a separate app and use rewrites to go from |
Hello -- Any chance you could see if this is now working? We just made improvements to forward more headers which should help here |
Is your feature request related to a problem? Please describe.
We would like to have our website using i18n feature from NextJS based on Domain Routing.
The way Amplify was designed, it creates an internal
Cloudfront
to manage DNS and certificates, and forward the request to anotherCloudfront
attached to the branch.The problem is that, by adding a rewrite rule, no information is propagated about the
Host
and then NextJS can not redirect the request based on the domain. Check the diagram bellow:If I intercept the request between internal CloudFront and the one rewritten to Serverless these are the only headers propagated:
As you can see, no
Host
information, and since it is working as a reverse proxy,x-forwarded-host
should be added in order to make it consistent and possible to integrate it better into the other layers.Describe the solution you'd like
Internal Cloudfront created by Amplify to manage DNS and Certificates should forward
x-forwarded-host
header, so nextjs can forward the request to the correct domain according to the request origin.The text was updated successfully, but these errors were encountered: