Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

csp-manifest.json in wrong directory #86

Open
Cirelion opened this issue Dec 30, 2022 · 2 comments
Open

csp-manifest.json in wrong directory #86

Cirelion opened this issue Dec 30, 2022 · 2 comments

Comments

@Cirelion
Copy link

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?

@adriancornea
Copy link

Hi @Cirelion I encountered the same issue, any luck finding a workaround?

@Cirelion
Copy link
Author

Cirelion commented Feb 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants