Skip to content

Script nonce policy#54

Merged
kentcdodds merged 1 commit into
mainfrom
cursor/script-nonce-policy-9e70
Jan 31, 2026
Merged

Script nonce policy#54
kentcdodds merged 1 commit into
mainfrom
cursor/script-nonce-policy-9e70

Conversation

@kentcdodds
Copy link
Copy Markdown
Member

@kentcdodds kentcdodds commented Jan 31, 2026

Test Plan

  1. Start the application locally (http://localhost:3000).
  2. Open browser developer tools and navigate to the Console tab.
  3. Reload the page.
  4. Verify that there are no CSP warnings related to inline scripts or missing nonces. (Note: unsafe-eval warnings may still be present as they are report-only and not addressed by this change).

Checklist

  • Tests updated
  • Docs updated

Screenshots


Console reload shows no inline/nonce CSP warnings (report-only unsafe-eval remains).

csp-console-check


Open in Cursor Open in Web


Note

Low Risk
Small, localized SSR change that only threads an existing nonce value into the router; low likelihood of behavioral impact beyond CSP-related script tagging.

Overview
Ensures SSR output complies with the app’s Content Security Policy by passing the generated nonce to ServerRouter in entry.server.tsx, so any inline scripts emitted during server rendering can be tagged with the correct nonce.

Written by Cursor Bugbot for commit e9ba139. This will update automatically on new commits. Configure here.

Co-authored-by: me <me@kentcdodds.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Jan 31, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@kentcdodds kentcdodds marked this pull request as ready for review January 31, 2026 16:39
@kentcdodds kentcdodds merged commit a38bb9f into main Jan 31, 2026
5 checks passed
@kentcdodds kentcdodds deleted the cursor/script-nonce-policy-9e70 branch January 31, 2026 16:39
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

Successfully merging this pull request may close these issues.

2 participants