22 lines
693 B
JavaScript
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;
|