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

Nonce not automatically set in script tags when using CSP #2464

Open
serhalp opened this issue Jun 13, 2024 · 0 comments
Open

Nonce not automatically set in script tags when using CSP #2464

serhalp opened this issue Jun 13, 2024 · 0 comments
Labels
Next.js e2e test failure Errors identified through the Next.js repo e2e tests Next.js

Comments

@serhalp
Copy link
Contributor

serhalp commented Jun 13, 2024

It doesn't seem to be documented, but the e2e test and fixture here expects a CSP to be automatically applied to scripts in the head. The docs show manually setting it, but the fixture seems to only set it in the response. Nevertheless, running next start does seem to set it automatically, but when deployed it doesn't. I think this is low priority because it seems to be undocumented behaviour.

Data

The following is parsed automatically by the Next.js repo e2e test report generator.

test case: https://github.com/vercel/next.js/blob/canary/test/e2e/app-dir/app/index.test.ts#L1711
test: test/e2e/app-dir/app/index.test.ts
reason: Nonce not automatically set in script tags when using CSP

@serhalp serhalp added type: bug code to address defects in shipped code Next.js e2e test failure Errors identified through the Next.js repo e2e tests labels Jun 13, 2024
@serhalp serhalp added the Next.js label Jun 14, 2024 — with Linear
@serhalp serhalp removed the type: bug code to address defects in shipped code label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Next.js e2e test failure Errors identified through the Next.js repo e2e tests Next.js
Projects
None yet
Development

No branches or pull requests

1 participant