Skip to content

Commit

Permalink
config 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaeyeon1 committed Nov 28, 2023
1 parent 50a6fa0 commit f043570
Showing 1 changed file with 10 additions and 70 deletions.
80 changes: 10 additions & 70 deletions client/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,8 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const removeImports = require('next-remove-imports')();

// const ContentSecurityPolicy = `
// default-src 'self';
// script-src 'self' 'unsafe-eval' 'unsafe-inline' giscus.app www.googletagmanager.com;
// style-src 'self' 'unsafe-inline';
// img-src * blob: data:;
// media-src 'none';
// connect-src *;
// font-src 'self';
// frame-src giscus.app
// `;
// const securityHeaders = [
// // https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
// {
// key: 'Content-Security-Policy',
// value: 'upgrade-insecure-requests',
// // 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 nextConfig = {
// ...options
output: 'export',
// ...options,
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
Expand All @@ -70,27 +20,17 @@ const nextConfig = {
},
],
},
// async redirects() {
// return [
// {
// source: '/',
// destination: '/collect',
// permanent: true,
// },
// ];
// },

// async headers() {
// return [
// {
// source: '/glogglogglog-env.eba-fuksumx7.ap-northeast-2.elasticbeanstalk.com',
// headers: securityHeaders,
// },
// ];
// },
async redirects() {
return [
{
source: '/',
destination: '/collect',
permanent: true,
},
];
},
};

module.exports = removeImports({
...nextConfig,
output: 'export',
});

0 comments on commit f043570

Please sign in to comment.