Closed Quix44 closed 3 months ago
🎉 Bounty Posted! 🎉 A bounty of 150 USDC has been added to this issue by Quix44!
:question: How to Claim This Bounty:
:receipt: Bounty Payment: Once your pull request is reviewed and merged, the funds will be automatically released to your wallet address through the GitPaid smart contract.
Happy coding!
Link to the code that reproduces this issue
https://github.com/tippfelher/nextjs-redirect-issue
To Reproduce
Open https://nextjs-permanent-redirect-issue.vercel.app/something The response header correctly contains Access-Control-Allow-Origin: *
Open https://nextjs-permanent-redirect-issue.vercel.app/something/ The response header contains no Access-Control-Allow-Origin: *
Current vs. Expected behavior
Open https://nextjs-permanent-redirect-issue.vercel.app/something/ The response header also contains Access-Control-Allow-Origin: *
Configuring https://nextjs.org/docs/pages/api-reference/next-config-js/trailingSlash is obviously no solution.
Provide environment information
no idea how to run this on Vercel, sorry. <3 Which area(s) are affected? (Select all that apply) Not sure
Which stage(s) are affected? (Select all that apply)
(Deployed), Other (Deployed)
Additional context
Repo for reproduction: https://github.com/tippfelher/nextjs-redirect-issue
Added route (/src/app/something/route.ts)
Added headers in nextjs.config.js