erettsegi-browser/next.config.js
2023-09-16 23:15:55 +02:00

46 lines
801 B
JavaScript

const securityHeaders = [
{
key: 'X-DNS-Prefetch-Control',
value: 'on',
},
{
key: 'X-XSS-Protection',
value: '1; mode=block',
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'Referrer-Policy',
value: 'strict-origin',
},
{
key: 'Content-Security-Policy',
value: `frame-ancestors 'self';`,
},
{
key: 'X-Frame-Options',
value: 'SAMEORIGIN',
},
{
key: 'Strict-Transport-Security',
value: 'max-age=31536000; includeSubDomains; preload',
},
{
key: 'Permissions-Policy',
value: 'camera=(), microphone=(), geolocation=()',
},
]
module.exports = {
async headers() {
return [
{
source: '/:path*',
headers: securityHeaders,
},
]
},
reactStrictMode: true,
}