Skip to content

Commit

Permalink
fix(docs): remove nonces from script-src
Browse files Browse the repository at this point in the history
  • Loading branch information
branko-stripe committed Oct 30, 2024
1 parent b1da9e0 commit 8d9a360
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions apps/docs/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function getContentSecurityPolicyHeaderValue(nonce: string, reportUri: string):
"img-src": [
`'self'`,
"cdn.usefathom.com",
"cdn.prod.website-files.com",
"github.com",
"storage.googleapis.com",
"stripe.com",
Expand All @@ -58,11 +59,7 @@ function getContentSecurityPolicyHeaderValue(nonce: string, reportUri: string):
"object-src": [`'none'`],
"report-uri": [reportUri], // for old browsers like Firefox
"report-to": ["csp"], // for modern browsers like Chrome
"script-src": [
`'nonce-${nonce}'`,
`'unsafe-inline'`, // ignored by browsers that support 'notices/hashes`
`'strict-dynamic'`, // force hashes and nonces over domain host lists
],
"script-src": [`'self'`, `'unsafe-inline'`],
"style-src": [`'self'`, `'unsafe-inline'`, "*.lemonsqueezy.com", "fonts.googleapis.com"],
};

Expand Down

0 comments on commit 8d9a360

Please sign in to comment.