teecup/frontend/next.config.mjs

24 lines
898 B
JavaScript
Raw Normal View History

2026-07-17 21:57:44 +02:00
// 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"
2026-07-17 21:40:42 +02:00
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
2026-07-17 21:40:42 +02:00
images: {
unoptimized: true,
},
2026-07-17 21:57:44 +02:00
async rewrites() {
return [
{ source: "/auth/:path*", destination: `${API_ORIGIN}/auth/:path*` },
{ source: "/orgs/:path*", destination: `${API_ORIGIN}/orgs/:path*` },
{ source: "/public/:path*", destination: `${API_ORIGIN}/public/:path*` },
{ source: "/superadmin/:path*", destination: `${API_ORIGIN}/superadmin/:path*` },
2026-07-17 21:57:44 +02:00
{ source: "/health", destination: `${API_ORIGIN}/health` },
]
},
2026-07-17 21:40:42 +02:00
}
export default nextConfig