From b7f7451954b1a77cad9506d3c87cb066259a2ef6 Mon Sep 17 00:00:00 2001 From: spicyzboss Date: Mon, 8 Jan 2024 21:56:59 +0700 Subject: [PATCH] chore(web-landing): remove CSP header --- apps/web/landing/src/routes/plugin@csp.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/apps/web/landing/src/routes/plugin@csp.ts b/apps/web/landing/src/routes/plugin@csp.ts index a451013..884af42 100644 --- a/apps/web/landing/src/routes/plugin@csp.ts +++ b/apps/web/landing/src/routes/plugin@csp.ts @@ -6,20 +6,4 @@ export const onRequest: RequestHandler = (event) => { const nonce = event.request.headers.get('cf-ray'); event.sharedMap.set('@nonce', nonce); - - const { hostname: rootFragmentHostname } = new URL(import.meta.env.VITE_ROOT_FRAGMENT_URL); - - const csp = [ - `default-src 'self' 'unsafe-inline' *.${rootFragmentHostname}`, - "font-src 'self' https://fonts.gstatic.com", - "img-src 'self' 'unsafe-inline' data:", - `script-src 'self' 'unsafe-inline' https: 'nonce-${nonce}' 'strict-dynamic'`, - "style-src 'self' 'unsafe-inline' https://fonts.googleapis.com", - `frame-src 'self' 'nonce-${nonce}'`, - "object-src 'none'", - "base-uri 'self'", - ]; - - event.headers.set('Content-Security-Policy', csp.join('; ')); }; -;