CSP + nonce in Pages router?
Unanswered
NDQ#6368 posted this in #help-forum
NDQ#6368OP
Hi, is there a way to implement nonces in Pages router? Example in docs and github seems to be utilizing next/headers, which is working only in app router.
Additionally _document doesn't return nonce in production build (present in middleware, present in document getInitialProps, but not in render method or function component).
https://nextjs.org/docs/pages/building-your-application/configuring/content-security-policy
Additionally _document doesn't return nonce in production build (present in middleware, present in document getInitialProps, but not in render method or function component).
https://nextjs.org/docs/pages/building-your-application/configuring/content-security-policy
1 Reply
NDQ#6368OP
upd: production build also throwing Hydration mismatch