2026-04-17 15:51:01 -04:00
|
|
|
import type { NextConfig } from "next";
|
|
|
|
|
|
|
|
|
|
const nextConfig: NextConfig = {
|
|
|
|
|
output: "standalone",
|
2026-05-04 00:04:21 -04:00
|
|
|
poweredByHeader: false,
|
|
|
|
|
compress: true,
|
2026-05-01 14:20:40 -04:00
|
|
|
images: {
|
|
|
|
|
formats: ["image/avif", "image/webp"],
|
2026-05-04 00:04:21 -04:00
|
|
|
minimumCacheTTL: 60 * 60 * 24 * 30, // 30 days
|
2026-05-01 14:20:40 -04:00
|
|
|
},
|
2026-05-01 11:14:14 -04:00
|
|
|
async headers() {
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
source: "/(.*)",
|
|
|
|
|
headers: [
|
|
|
|
|
{ key: "X-Frame-Options", value: "SAMEORIGIN" },
|
|
|
|
|
{ key: "X-Content-Type-Options", value: "nosniff" },
|
|
|
|
|
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
|
|
|
|
|
{
|
|
|
|
|
key: "Permissions-Policy",
|
|
|
|
|
value: "camera=(), microphone=(), geolocation=()",
|
|
|
|
|
},
|
|
|
|
|
{ key: "X-DNS-Prefetch-Control", value: "on" },
|
|
|
|
|
],
|
|
|
|
|
},
|
2026-05-04 00:04:21 -04:00
|
|
|
{
|
|
|
|
|
// Long cache for static images served from /public/images.
|
|
|
|
|
source: "/images/(.*)",
|
|
|
|
|
headers: [
|
|
|
|
|
{
|
|
|
|
|
key: "Cache-Control",
|
|
|
|
|
value: "public, max-age=31536000, immutable",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
},
|
|
|
|
|
async redirects() {
|
|
|
|
|
return [
|
|
|
|
|
// Force apex hostname. The www host should be terminated upstream
|
|
|
|
|
// (Nginx Proxy Manager) and pointed at this app, OR redirected at the
|
|
|
|
|
// proxy. This Next-side redirect is a belt-and-braces fallback so that
|
|
|
|
|
// www → apex still happens if traffic reaches the app on the wrong host.
|
|
|
|
|
{
|
|
|
|
|
source: "/:path*",
|
|
|
|
|
has: [{ type: "host", value: "www.wilddragon.net" }],
|
|
|
|
|
destination: "https://wilddragon.net/:path*",
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2026-05-01 11:14:14 -04:00
|
|
|
];
|
|
|
|
|
},
|
2026-04-17 15:51:01 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default nextConfig;
|