/** @type {import('next').NextConfig} */ const BACKEND_INTERNAL_URL = process.env.BACKEND_INTERNAL_URL || "http://localhost:20001"; const STORAGE_INTERNAL_URL = process.env.STORAGE_INTERNAL_URL || process.env.FILER_INTERNAL_URL || "http://localhost:3103"; const STORAGE_BUCKET_PATH = process.env.STORAGE_BUCKET_PATH || process.env.FILER_BUCKET_PATH || "/buckets/transit"; const nextConfig = { reactStrictMode: true, output: "standalone", images: { remotePatterns: [{ protocol: "http", hostname: "**" }, { protocol: "https", hostname: "**" }] }, async rewrites() { return [ { source: "/files/:path*", destination: `${STORAGE_INTERNAL_URL}${STORAGE_BUCKET_PATH}/:path*` }, { source: "/api/:path*", destination: `${BACKEND_INTERNAL_URL}/api/:path*` } ]; } }; export default nextConfig;