42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const contentSecurityPolicy = [
|
|
"default-src 'self'",
|
|
`script-src 'self' 'unsafe-inline'${process.env.NODE_ENV === "development" ? " 'unsafe-eval'" : ""}`,
|
|
"style-src 'self' 'unsafe-inline'",
|
|
"img-src 'self' data: https://tile.openstreetmap.org",
|
|
"font-src 'self'",
|
|
"connect-src 'self'",
|
|
"object-src 'none'",
|
|
"base-uri 'self'",
|
|
"form-action 'self'",
|
|
"frame-ancestors 'none'",
|
|
].join("; ");
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
poweredByHeader: false,
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/(.*)",
|
|
headers: [
|
|
{ key: "Content-Security-Policy", value: contentSecurityPolicy },
|
|
{ key: "Referrer-Policy", value: "no-referrer" },
|
|
{ key: "X-Content-Type-Options", value: "nosniff" },
|
|
{ key: "X-Frame-Options", value: "DENY" },
|
|
{ key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=()" },
|
|
],
|
|
},
|
|
];
|
|
},
|
|
serverExternalPackages: ["postgres"],
|
|
transpilePackages: [
|
|
"@minecraft-account-manager/contracts",
|
|
"@minecraft-account-manager/database",
|
|
"@minecraft-account-manager/logging",
|
|
],
|
|
};
|
|
|
|
export default nextConfig;
|