Files
loki df654fcb92
CI / backend-tests (push) Successful in 9s
Docker images / version (push) Successful in 1s
CI / docker (push) Successful in 21s
Docker images / backend (push) Successful in 5s
Docker images / frontend (push) Successful in 6s
fix: api-proxy per middleware (laufzeit-env statt build-time rewrites)
2026-10-04 13:52:18 +02:00

22 lines
693 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
images: {
remotePatterns: [
{ protocol: "https", hostname: "**.dzcdn.net" },
{ protocol: "https", hostname: "e-cdns-images.dzcdn.net" },
{ protocol: "https", hostname: "cdn-images.dzcdn.net" },
],
},
async rewrites() {
// Dev fallback only. In Docker/standalone the middleware.ts proxy handles
// /api/* with the runtime BACKEND_URL (rewrites are build-time there).
const backend = process.env.BACKEND_URL || "http://127.0.0.1:8000";
return [
{ source: "/api/:path*", destination: `${backend}/api/:path*` },
];
},
};
module.exports = nextConfig;