CSP in middleware with pages router
Unanswered
Abyssinian posted this in #help-forum
AbyssinianOP
I tried implementing CSP in middlware as described in the Nextjs documentation. Before I had the CSP in the next.config.js file. After implementing the new CSP page navigation broke on the site. No change in the content of the CSP or site, only difference was serving it from middleware instead of the config. It seems like all context providers break on page navigation after the change. Is there something I need to keep in mind to get this to work?