Routes /api/* requests to backend:8000 internally via Docker network. Replaces nginx reverse proxy with Next.js built-in rewrites.
26 lines
451 B
TypeScript
26 lines
451 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
turbopack: {
|
|
root: __dirname,
|
|
},
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: "/api/:path*",
|
|
destination: "http://backend:8000/:path*",
|
|
},
|
|
];
|
|
},
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: "https",
|
|
hostname: "artifactsmmo.com",
|
|
pathname: "/images/**",
|
|
},
|
|
],
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|