import type { NextConfig } from "next"; const API_UPSTREAM = process.env.API_UPSTREAM ?? "http://127.0.0.1:8470"; const nextConfig: NextConfig = { reactStrictMode: true, poweredByHeader: false, turbopack: { rules: { "*.css": { loaders: ["@tailwindcss/turbopack"], as: "*.css", }, }, }, async rewrites() { return [{ source: "/api/:path*", destination: `${API_UPSTREAM}/api/:path*` }]; }, async headers() { return [ { source: "/(.*)", headers: [ { key: "X-Frame-Options", value: "DENY" }, { key: "X-Content-Type-Options", value: "nosniff" }, { key: "Referrer-Policy", value: "same-origin" }, ], }, ]; }, }; export default nextConfig;