next-safe-middleware
next-safe-middleware copied to clipboard
csp-manifest.json in wrong directory
I have a app that's running on NextJS using NX as a monorepo tool. The consequence of this is that my .next directory is in a different directory from the project root. next-safe-middleware seems to inject a directory called ~csp into the .next/static directory. This is wrong for my use-case and is the most likely reason for next-safe-middleware not working in my app.
Is there any way to override the default .next directory location?
Hi @Cirelion I encountered the same issue, any luck finding a workaround?
I ended up ignoring this particular part of the issue, implementing the rest of the recommended steps. I think adding gsspWithNonce() to all getServerSideProps calls that require the CSP stuff will work.