feat: serve website at root path

This commit is contained in:
boos
2026-06-06 05:59:48 +08:00
parent 03046152fd
commit 5ef017c54e
6 changed files with 155 additions and 60 deletions
+4 -19
View File
@@ -1,29 +1,14 @@
import type { NextConfig } from "next";
const backendUrl = process.env.BOSSAI_BACKEND_URL || "http://127.0.0.1:4000";
const nextConfig: NextConfig = {
output: "standalone",
output: "export",
poweredByHeader: false,
images: {
unoptimized: true,
},
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;