// API-et proxyes server-side under samme opprinnelse (ingen CORS, cookien // fungerer uendret) -- se ADR-009/015. TEECUP_API_ORIGIN peker mot en lokal // backend i dev; i prod peker den mot teecup_api på det delte Docker-nettverket. const API_ORIGIN = process.env.TEECUP_API_ORIGIN || "http://localhost:8000" /** @type {import('next').NextConfig} */ const nextConfig = { output: "standalone", images: { unoptimized: true, }, async rewrites() { return [ { source: "/auth/:path*", destination: `${API_ORIGIN}/auth/:path*` }, { source: "/orgs/:path*", destination: `${API_ORIGIN}/orgs/:path*` }, { source: "/health", destination: `${API_ORIGIN}/health` }, ] }, } export default nextConfig