peer-at-code-web/next.config.js
2023-04-23 23:24:41 +02:00

45 lines
1.3 KiB
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
experimental: {
appDir: true,
scrollRestoration: true
},
headers: async () => {
return [
{
source: '/:path*',
headers: [
{
key: 'X-Frame-Options',
value: 'DENY'
},
{
key: 'Content-Security-Policy',
value:
"connect-src 'self' https://api.peerat.dev wss://api.peerat.dev; default-src 'self'; font-src 'self'; frame-ancestors 'none'; img-src 'self' data:; script-src 'self'; style-src 'self' https://fonts.googleapis.com; object-src 'none'; base-uri 'none'; form-action 'none'; frame-src 'none'; manifest-src 'self'; media-src 'self'; worker-src 'self'"
},
{
key: 'X-Content-Type-Options',
value: 'nosniff'
},
{
key: 'Permissions-Policy',
value: 'camera=(), battery=(), geolocation=(), microphone=(), browsing-topics=()'
},
{
key: 'Referrer-Policy',
value: 'strict-origin-when-cross-origin'
},
{
key: 'Strict-Transport-Security',
value: 'max-age=31536000; includeSubDomains; preload'
}
]
}
];
}
};
module.exports = nextConfig;