-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
The header settings doesn't work after adding i18n settingss to nextconfig for the files under pages folder #58291
Comments
Related to #54159 |
Eventually we had to write a middleware to solve this headers problem. i18n settings seem to be rather instable for long, since somewhere around next v13.4. The routing server doesn't always work correctly. With some versions of next, the files in the public folder return 404. We also had to use middleware to make it work. In the docs for App Router, they don't even mention i18n in next.config. I assume it's not supported any more, but it should then be communicated explicitly right? |
@cosieLq Yeah, they need to make it clear whether it is supported or not. Thank you for your advice, we will try to use middleware to solve the problem and waiting for their reponse |
Hi, I wasn't able to reproduce the behavior you described with your reproduction on the latest canary. Response headers from the If the concern is that the Please don't hesitate to ping or open another issue if you are still encountering problems! |
@ztanner But currently our team is prefer to stay in nextjs 13. I tried the newest canary for 13.5.7 (13.5.7-canary.37) and I can still reproduce the issue. As there is still a canary, we believe nextjs 13 is still supported. Is there any plan to fix it in nextjs 13? |
Hi @LIU-CE-01 -- I'm afraid we only backport security related fixes, not bugs. However middleware seems like it would be a workaround if you're unable to upgrade or downgrade to a working version. |
Hi @ztanner |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/LIU-CE-01/nextjs-bug-report
To Reproduce
I'm using nextjs 13.5.6 and I added some header settings and i18n settings in the next.config.js
Current vs. Expected behavior
Current:
When i18n settings is included, csp is not included in the response headers.
When i18n settings is commented, csp is included in the response headers.
Expected:
csp should be included in the response headers no matter whether we have i18n settings in next.config.js
Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
Internationalization (i18n)
Additional context
We have used the version 13.4.3 and it seems we don't have the same issue
The text was updated successfully, but these errors were encountered: