Response headers in next.js config are not applied to standalone/_next/static (when i18n is configured) #54159
Closed
1 task done
Labels
bug
Issue was opened via the bug report template.
locked
Output (export/standalone)
Related to the the output option in `next.config.js`.
Verify canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP Wed Mar 2 00:30:59 UTC 2022 Binaries: Node: 18.12.1 npm: 8.19.2 Yarn: 3.6.1 pnpm: N/A Relevant Packages: next: 13.4.17-canary.1 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 Next.js Config: output: standalone
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Standalone mode (output: "standalone")
Link to the code that reproduces this issue or a replay of the bug
https://github.com/cosieLq/exampleApp_nextjs/tree/reproduction-missing-headers
To Reproduce
yarn install
and thennext build
Describe the Bug
The headers (Cache-Control and other options mentioned here: https://nextjs.org/docs/pages/api-reference/next-config-js/headers#options) are correctly set for /public.
But they are missing for .next/static.
Expected Behavior
Headers in next.config are applied to .next/static as well.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: