Next.js Discord

Discord Forum

CSP for decentralized frontent

Answered
Philogicae posted this in #help-forum
Open in Discord
Hi guys,
I just made the migration to the app directory (Nextjs 14), and regarding CSP header I saw it implies a middleware with the generation of a nonce on server side. My dapp is obviously fully client side, so I'm not sure how to proceed to handle CSP rules. Didn't find any info online or in the docs unfortunately
Answered by Philogicae
Solution: Reading the answers here, I realized it's actually still possible to include CSP into Metadata and it will be rendered, even if it's not recommended https://nextjs.org/docs/app/api-reference/functions/generate-metadata#unsupported-metadata
View full answer

1 Reply

Solution: Reading the answers here, I realized it's actually still possible to include CSP into Metadata and it will be rendered, even if it's not recommended https://nextjs.org/docs/app/api-reference/functions/generate-metadata#unsupported-metadata
Answer