1.0 KB
raw
/** @type {import('next').NextConfig} */
const securityHeaders = [
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "X-Frame-Options", value: "SAMEORIGIN" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
{
key: "Permissions-Policy",
value: "camera=(), microphone=(), geolocation=(), interest-cohort=()",
},
{
key: "Content-Security-Policy",
value: [
"default-src 'self'",
"script-src 'self' 'unsafe-inline' 'unsafe-eval'",
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com",
"img-src 'self' data: blob:",
"font-src 'self' data: https://fonts.gstatic.com",
"connect-src 'self' blob:",
"manifest-src 'self'",
"base-uri 'self'",
"form-action 'self'",
"frame-ancestors 'self'",
].join("; "),
},
];
const nextConfig = {
devIndicators: {
position: "top-right",
},
async headers() {
return [
{
source: "/:path*",
headers: securityHeaders,
},
];
},
};
module.exports = nextConfig;