From 74a3ffc7262f64fa2ad8c3bb84c2ad4f34b498c2 Mon Sep 17 00:00:00 2001 From: kimhyojung <706shin1728@naver.com> Date: Fri, 6 Dec 2024 15:51:51 +0900 Subject: [PATCH] Update next.config.js --- next.config.js | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/next.config.js b/next.config.js index 86acba3..cc29137 100644 --- a/next.config.js +++ b/next.config.js @@ -16,44 +16,6 @@ const ContentSecurityPolicy = ` frame-src giscus.app ` -const securityHeaders = [ - // https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP - { - key: 'Content-Security-Policy', - value: ContentSecurityPolicy.replace(/\n/g, ''), - }, - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy - { - key: 'Referrer-Policy', - value: 'strict-origin-when-cross-origin', - }, - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options - { - key: 'X-Frame-Options', - value: 'DENY', - }, - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options - { - key: 'X-Content-Type-Options', - value: 'nosniff', - }, - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-DNS-Prefetch-Control - { - key: 'X-DNS-Prefetch-Control', - value: 'on', - }, - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security - { - key: 'Strict-Transport-Security', - value: 'max-age=31536000; includeSubDomains', - }, - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy - { - key: 'Permissions-Policy', - value: 'camera=(), microphone=(), geolocation=()', - }, -] - const output = process.env.EXPORT ? 'export' : undefined const basePath = process.env.BASE_PATH || undefined const unoptimized = process.env.UNOPTIMIZED ? true : undefined @@ -80,14 +42,6 @@ module.exports = () => { ], unoptimized, }, - async headers() { - return [ - { - source: '/(.*)', - headers: securityHeaders, - }, - ] - }, webpack: (config, options) => { config.module.rules.push({ test: /\.svg$/,