-
Hi, Just wondering if anybody has an explanation for the inline scripts being generated by NextJS when using the experimental I've noticed a number of them are currently being injected into the page, all beginning "self.__next_f...". They seem to contain parts of random stringified components. They're only generated when using the Does anyone have any info as to what these are for and/or any ideas for getting around this from a CSP perspective, without using Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I was just about to post this same issue about adopting the I don't have an answer, but I do notice that it seems to be listing various webpack chunks. I wonder if the same issue happens with Turbopack, but unfortunately, even if it does, we aren't able to adopt that yet. I also wonder if this should be posted as a security issue instead of just having it noted in a discussion here. |
Beta Was this translation helpful? Give feedback.
-
This is possible using See this comment for implementation: |
Beta Was this translation helpful? Give feedback.
-
Hey folks, wanted to swing back here with an update. After digging through many different issues and discussions, I've made a new page in the documentation (PR) specifically for Content Security Policy and nonces. This docs page:
Further, we've patched some bugs and made improvements to Really hope this helps out, thank you all 🙏 I'll be closing this discussion out. To continue the discussion, please go here. |
Beta Was this translation helpful? Give feedback.
Hey folks, wanted to swing back here with an update. After digging through many different issues and discussions, I've made a new page in the documentation (PR) specifically for Content Security Policy and nonces. This docs page:
nonce
with Middlewarenonce
in a route withheaders()
unsafe
nonce
Middleware from running on prefetches / static assetsFurther, we've patched some bugs and made improvements to
nonce
handling in Next.js that will be available in the latestcanary
version (for those of you time traveling from the future, upgrade to Next.js 13.5). We also …