import createNextIntlPlugin from "next-intl/plugin"; const withNextIntl = createNextIntlPlugin("./src/i18n/request.ts"); const cmsUrl = process.env.NEXT_PUBLIC_STRAPI_URL || process.env.STRAPI_URL || "http://localhost:1337"; const cmsHostname = new URL(cmsUrl).hostname; const cmsPort = new URL(cmsUrl).port || undefined; const nextConfig = { eslint: { ignoreDuringBuilds: true, }, images: { remotePatterns: [ { protocol: "http" as const, hostname: cmsHostname, port: cmsPort, pathname: "/uploads/**", }, ], }, async headers() { return [ { source: "/(.*)", headers: [ { key: "X-Frame-Options", value: "DENY", }, { key: "X-Content-Type-Options", value: "nosniff", }, { key: "Referrer-Policy", value: "strict-origin-when-cross-origin", }, { key: "X-DNS-Prefetch-Control", value: "on", }, { key: "Strict-Transport-Security", value: "max-age=63072000; includeSubDomains; preload", }, { key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=()", }, ], }, ]; }, }; export default withNextIntl(nextConfig);