To implement Content Security Policy, I need to pass a random token generated in the Document
component at _document.js
file to the NextApp
component at the _app.js
file.
I want to do that without using the request object or context. I think it should be possible because the Document component wraps the NextApp component.
Is there a clean way to send props from the Document component to the NextApp component in a clean and Next.js idiomatic way?