Files
manyangles/apps/web/next.config.ts
T

42 lines
1.1 KiB
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: "standalone",
poweredByHeader: false,
images: { qualities: [75, 85] },
async redirects() {
return [{
source: "/:path*",
has: [{ type: "host", value: "manyangles.hadlock.tech" }],
destination: "https://ma.hadlock.tech/:path*",
permanent: true,
}];
},
transpilePackages: [
"@album/contracts",
"@album/database",
"@album/email",
"@album/storage",
],
async headers() {
const securityHeaders = [
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "X-Frame-Options", value: "DENY" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
{
key: "Permissions-Policy",
value: "camera=(), geolocation=(), microphone=(), payment=()",
},
];
if (process.env.NODE_ENV === "production") {
securityHeaders.push({
key: "Strict-Transport-Security",
value: "max-age=31536000; includeSubDomains",
});
}
return [{ source: "/(.*)", headers: securityHeaders }];
},
};
export default nextConfig;