Skip to content

Commit

Permalink
Update next.config.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
w3bdesign committed Jul 22, 2024
1 parent c193124 commit 5662c5a
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ const nextConfig = {
],
},
async headers() {

/*
const cspHeader = `
default-src 'self';
script-src 'self' 'unsafe-eval';
script-src 'self' 'unsafe-eval' 'unsafe-inline';
style-src 'self' 'unsafe-inline';
img-src 'self' blob: data: https://cdn.sanity.io;
font-src 'self';
Expand All @@ -21,6 +23,24 @@ const nextConfig = {
frame-ancestors 'none';
upgrade-insecure-requests;
`.replace(/\s{2,}/g, ' ').trim();
*/


const cspHeader = `
default-src 'self';
script-src 'report-sample' 'self';
style-src 'report-sample' 'self';
object-src 'none';
base-uri 'self';
connect-src 'self';
font-src 'self';
frame-src 'self';
img-src 'self';
manifest-src 'self';
media-src 'self';
report-uri https://669ece24abce8c3d2411fdd1.endpoint.csper.io/?v=0;
worker-src 'none';
`.replace(/\s{2,}/g, ' ').trim();

return [
{
Expand Down

0 comments on commit 5662c5a

Please sign in to comment.