Next.js Discord

Discord Forum

Next.js doc example doesnt work

Unanswered
American Chinchilla posted this in #help-forum
Open in Discord
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?

2 Replies

American ChinchillaOP
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?