fix: allow unsafe-inline styles in dev CSP, suppress hydration warning on theme bootstrap script
CI / test (push) Failing after 33s
CI / test (push) Failing after 33s
This commit is contained in:
@@ -56,6 +56,7 @@ export default async function LocaleLayout({ children, params }: LocaleLayoutPro
|
||||
<script
|
||||
id="theme-bootstrap"
|
||||
nonce={nonce}
|
||||
suppressHydrationWarning
|
||||
dangerouslySetInnerHTML={{ __html: themeBootstrapScript }}
|
||||
/>
|
||||
</head>
|
||||
|
||||
@@ -9,7 +9,7 @@ export function buildContentSecurityPolicy(nonce: string, development: boolean):
|
||||
const directives = [
|
||||
"default-src 'self'",
|
||||
`script-src ${scriptSources.join(' ')}`,
|
||||
`style-src 'self' 'nonce-${nonce}'`,
|
||||
`style-src 'self' 'nonce-${nonce}'${development ? " 'unsafe-inline'" : ''}`,
|
||||
"img-src 'self' data: blob:",
|
||||
"font-src 'self' data:",
|
||||
`connect-src 'self'${development ? ' ws: wss:' : ''}`,
|
||||
|
||||
Reference in New Issue
Block a user