diff --git a/functions/_middleware.js b/functions/_middleware.js index b7b7ea7..89f29b7 100644 --- a/functions/_middleware.js +++ b/functions/_middleware.js @@ -13,7 +13,7 @@ async function handleNonceResponse(response) { let newHeaders = new Headers(response.headers); newHeaders.set('Reporting-Endpoints', 'csp-endpoint="https://csp.gander.tools/"') - newHeaders.set('Content-Security-Policy-Report-Only', `default-src 'self'; script-src https: 'unsafe-inline' 'nonce-${nonce}' 'strict-dynamic' https://static.cloudflareinsights.com/beacon.min.js; object-src 'none'; base-uri 'none'; connect-src https://cloudflareinsights.com/ https://medama.gander.tools/ https://sentry.gander.tools/; style-src 'nonce-${nonce}'; require-trusted-types-for 'script'; report-to csp-endpoint; report-uri https://csp.gander.tools/`); + newHeaders.set('Content-Security-Policy-Report-Only', `default-src 'self'; script-src 'self' 'unsafe-inline' 'nonce-${nonce}' 'strict-dynamic'; object-src 'none'; base-uri 'none'; connect-src 'self' medama.gander.tools sentry.gander.tools; style-src 'self' 'unsafe-inline' 'nonce-${nonce}'; require-trusted-types-for 'script'; report-to csp-endpoint; report-uri https://csp.gander.tools/`); let body = await response.text(); body = body.replace(/{{CSP-NONCE}}/g, nonce);