Skip to content
2 changes: 1 addition & 1 deletion lib/security/contentSecurityPolicy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export function validateStrictContentSecurityPolicy(headerValue: string): string
}

const hasScriptNonce =
/(?:^|;)\s*script-src\s+[^;]*'nonce-[^']+'(?:;|$)/.test(
/(?:^|;)\s*script-src\s+[^;]*'nonce-[^']+'(?=\s|;|$)[^;]*(?:;|$)/.test(
headerValue,
);
Comment thread
Chigael marked this conversation as resolved.

Expand Down
Loading