feat: isolate BossAI website with Next.js
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const backendUrl = process.env.BOSSAI_BACKEND_URL || "http://127.0.0.1:4000";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
output: "standalone",
|
||||
poweredByHeader: false,
|
||||
turbopack: {
|
||||
root: __dirname,
|
||||
},
|
||||
async rewrites() {
|
||||
return [
|
||||
{ source: "/boos", destination: `${backendUrl}/boos` },
|
||||
{ source: "/user/:path*", destination: `${backendUrl}/user/:path*` },
|
||||
{ source: "/api/:path*", destination: `${backendUrl}/api/:path*` },
|
||||
{ source: "/v1/:path*", destination: `${backendUrl}/v1/:path*` },
|
||||
{ source: "/assets/:path*", destination: `${backendUrl}/assets/:path*` },
|
||||
{ source: "/workflow-ui/:path*", destination: `${backendUrl}/workflow-ui/:path*` },
|
||||
{ source: "/comfyui/:path*", destination: `${backendUrl}/comfyui/:path*` },
|
||||
{ source: "/monitor-proxy/:path*", destination: `${backendUrl}/monitor-proxy/:path*` },
|
||||
{ source: "/oauth/:path*", destination: `${backendUrl}/oauth/:path*` },
|
||||
{ source: "/health", destination: `${backendUrl}/health` },
|
||||
{ source: "/ready", destination: `${backendUrl}/ready` },
|
||||
{ source: "/metrics", destination: `${backendUrl}/metrics` },
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
Reference in New Issue
Block a user