Next.js doc example doesnt work
Unanswered
American Chinchilla posted this in #help-forum
American ChinchillaOP
Hi i tried following the guide for content security policy and the middleware example without nonces doesnt work.
I tested the app by importing a google font script using the Script tag but it didnt throw an error.
If i use the next.js config code example (instead of putting the CSP in the middleware its done in next.js config) it works.
Im confused why its not working or am i missing something?
I tested the app by importing a google font script using the Script tag but it didnt throw an error.
If i use the next.js config code example (instead of putting the CSP in the middleware its done in next.js config) it works.
Im confused why its not working or am i missing something?
2 Replies
American ChinchillaOP
https://nextjs.org/docs/app/building-your-application/configuring/content-security-policy
this is the guide I followed
this is the guide I followed
Broad-snouted Caiman
Hi All! I am struggling to submit an issue of an example for Next.js: https://github.com/vercel/next.js/issues/77021 Can anybody help?