fix(web): nonce Google tag loader
This commit is contained in:
@@ -46,7 +46,7 @@ function contentSecurityPolicy(nonce: string): string {
|
||||
const mediaOrigin = new URL(STRAPI_URL).origin;
|
||||
const directives = [
|
||||
"default-src 'self'",
|
||||
`script-src 'self' 'nonce-${nonce}' https://www.googletagmanager.com`,
|
||||
`script-src 'self' 'nonce-${nonce}' 'strict-dynamic' https://www.googletagmanager.com`,
|
||||
"script-src-attr 'none'",
|
||||
"style-src 'self' 'unsafe-inline'",
|
||||
`img-src 'self' ${mediaOrigin} https://www.google-analytics.com data: blob:`,
|
||||
|
||||
@@ -211,6 +211,7 @@ export function Layout({ children }: { children: ReactNode }) {
|
||||
<Meta />
|
||||
<Links />
|
||||
<script
|
||||
nonce={nonce}
|
||||
async
|
||||
src="https://www.googletagmanager.com/gtag/js?id=G-TJT6NM2DMT"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user