mirror of
https://github.com/velocitatem/cvfs.git
synced 2026-05-31 08:43:37 +00:00
Set proxy fallback to https://api.cv.alves.world
https://claude.ai/code/session_01Xmxm2QLgFBgRJyYD6VukR6
This commit is contained in:
@@ -4,9 +4,7 @@ import path from "node:path";
|
|||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
outputFileTracingRoot: path.join(process.cwd(), "../.."),
|
outputFileTracingRoot: path.join(process.cwd(), "../.."),
|
||||||
async rewrites() {
|
async rewrites() {
|
||||||
// In Docker (Dokploy/compose) the backend container is always reachable at cvfs-backend:8080.
|
const backend = process.env.API_BASE_URL ?? "https://api.cv.alves.world";
|
||||||
// Override with API_BASE_URL for local dev (e.g. http://localhost:9812).
|
|
||||||
const backend = process.env.API_BASE_URL ?? "http://cvfs-backend:8080";
|
|
||||||
return [{ source: "/api/:path*", destination: `${backend}/api/:path*` }];
|
return [{ source: "/api/:path*", destination: `${backend}/api/:path*` }];
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user