You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 79cc7b4
Browse filesBrowse the repository at this point in the historyBrowse files
Add multiple ways to configure a CSP nonce for injected <style> tags:
1. StyleSheetManager nonce prop (recommended for Next.js, Remix)
2. ServerStyleSheet constructor nonce option (SSR)
3. <meta property="csp-nonce"> auto-detection (Vite convention)
4. <meta name="sc-nonce"> auto-detection (SC convention)
5. __webpack_nonce__ global (legacy, preserved for backward compat)
The nonce flows through SheetOptions to makeStyleTag, ensuring all
dynamically created style elements receive the nonce attribute.
Based on PR #4356 by @ericsen-tsai.
Closes#4258
Co-authored-by: Ericsen Tsai <[email protected]>
Add first-class CSP nonce support. Nonces can now be configured via `StyleSheetManager`'s `nonce` prop (recommended for Next.js, Remix), `ServerStyleSheet`'s constructor, `<meta property="csp-nonce">` (Vite convention), `<meta name="sc-nonce">`, or the legacy `__webpack_nonce__` global.
0 commit comments