mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-03 05:45:04 +03:00
fix: add static.cloudflareinsights.com to CSP script-src (#7178)
PR #7178 — The CSP was blocking the Cloudflare Web Analytics beacon (static.cloudflareinsights.com). Both dev and prod script-src directives need the domain for the analytics script to load. Co-authored-by: oyi77 <oyi77@users.noreply.github.com>
This commit is contained in:
@@ -9,8 +9,8 @@ const distDir = process.env.NEXT_DIST_DIR || ".build/next";
|
||||
const projectRoot = dirname(fileURLToPath(import.meta.url));
|
||||
const scriptSrc =
|
||||
process.env.NODE_ENV === "development"
|
||||
? "script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:"
|
||||
: "script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:";
|
||||
? "script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: https://static.cloudflareinsights.com"
|
||||
: "script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: https://static.cloudflareinsights.com";
|
||||
const contentSecurityPolicy = [
|
||||
"default-src 'self'",
|
||||
"base-uri 'self'",
|
||||
|
||||
Reference in New Issue
Block a user