next.js
next.js copied to clipboard
Allow passing a nonce to two third-party libraries
Specifically, <GoogleAnalytics> and <GoogleTagManager>. I did not know how to add it to the YouTube and Google Maps embeds, since they do not use the <Script> tag directly and I didn't quite know how those are run, but this at least partially fixes #61714.
Unfortunately, my laptop froze when trying to run non-unit tests or build, so I haven't been able to do that. I also didn't find existing unit tests I could expand on. However, I did copy the code into ours, and it worked well there.
This PR seems stalled. I came here to create this exact PR. Let me know if I can help in any way.