Skip to content

Commit

Permalink
chore(web-landing): remove CSP header
Browse files Browse the repository at this point in the history
  • Loading branch information
spicyzboss committed Jan 8, 2024
1 parent e788bfd commit b7f7451
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions apps/web/landing/src/routes/plugin@csp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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('; '));
};
;

0 comments on commit b7f7451

Please sign in to comment.