teecup/frontend/next.config.mjs
2026-07-17 21:57:44 +02:00

20 lines
706 B
JavaScript

// 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 = {
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