55 lines
1.5 KiB
JavaScript
55 lines
1.5 KiB
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: true,
|
|
output: "standalone",
|
|
eslint: {
|
|
ignoreDuringBuilds: true,
|
|
},
|
|
experimental: {
|
|
serverComponentsExternalPackages: ["pdf-parse"],
|
|
},
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/(.*)",
|
|
headers: [
|
|
{
|
|
key: "X-Frame-Options",
|
|
value: "DENY",
|
|
},
|
|
{
|
|
key: "X-Content-Type-Options",
|
|
value: "nosniff",
|
|
},
|
|
{
|
|
key: "X-XSS-Protection",
|
|
value: "1; mode=block",
|
|
},
|
|
{
|
|
key: "Referrer-Policy",
|
|
value: "strict-origin-when-cross-origin",
|
|
},
|
|
{
|
|
key: "Strict-Transport-Security",
|
|
value: "max-age=31536000; includeSubDomains; preload",
|
|
},
|
|
{
|
|
key: "Permissions-Policy",
|
|
value: "camera=(), microphone=(), geolocation=(), payment=(), usb=()",
|
|
},
|
|
{
|
|
key: "Content-Security-Policy",
|
|
value: "default-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; connect-src 'self' https:; frame-ancestors 'none'; object-src 'none'; base-uri 'self';",
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
webpack: (config) => {
|
|
config.resolve.alias.canvas = false;
|
|
config.resolve.alias.encoding = false;
|
|
return config;
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|