Next.js Discord

Discord Forum

CSP (Content Secure Policy)

Answered
Havana posted this in #help-forum
Open in Discord
Avatar
HavanaOP
Is CSP handled by nextJS or should I build my own CSP handler?
Answered by B33fb0n3
if you want to directly configure your CSP you can do that via the nextjs config: https://nextjs.org/docs/app/building-your-application/configuring/content-security-policy#without-nonces

Some other sources are restricted/allowed by default. For example when you try to use images from an external url, you need to especially add them inside the images
View full answer

4 Replies

Avatar
if you want to directly configure your CSP you can do that via the nextjs config: https://nextjs.org/docs/app/building-your-application/configuring/content-security-policy#without-nonces

Some other sources are restricted/allowed by default. For example when you try to use images from an external url, you need to especially add them inside the images
Answer
Avatar
@Havana solved?
Avatar
HavanaOP
Yes I think so
Avatar
happy to help