Spaces:
Running
Running
feat: add base path configuration and update proxy routing to use gateway port
Browse files- health-server.js +2 -3
- start.sh +2 -1
health-server.js
CHANGED
|
@@ -6,7 +6,6 @@ const net = require("net");
|
|
| 6 |
|
| 7 |
const PORT = 7861;
|
| 8 |
const GATEWAY_PORT = 7860;
|
| 9 |
-
const BROWSER_PORT = 7862;
|
| 10 |
const GATEWAY_HOST = "127.0.0.1";
|
| 11 |
const startTime = Date.now();
|
| 12 |
const LLM_MODEL = process.env.LLM_MODEL || "Not Set";
|
|
@@ -1015,7 +1014,7 @@ const server = http.createServer((req, res) => {
|
|
| 1015 |
if (isDashboardAppRoute(pathname) || isAppRoute(pathname)) {
|
| 1016 |
const proxyPath =
|
| 1017 |
stripDashboardAppPrefix(pathname) + (parsedUrl.search || "");
|
| 1018 |
-
proxyHttp(req, res, proxyPath,
|
| 1019 |
return;
|
| 1020 |
}
|
| 1021 |
|
|
@@ -1033,7 +1032,7 @@ server.on("upgrade", (req, socket, head) => {
|
|
| 1033 |
const parsedUrl = parseRequestUrl(req.url || "/");
|
| 1034 |
const proxyPath =
|
| 1035 |
stripDashboardAppPrefix(pathname) + (parsedUrl.search || "");
|
| 1036 |
-
proxyUpgrade(req, socket, head, proxyPath,
|
| 1037 |
return;
|
| 1038 |
}
|
| 1039 |
|
|
|
|
| 6 |
|
| 7 |
const PORT = 7861;
|
| 8 |
const GATEWAY_PORT = 7860;
|
|
|
|
| 9 |
const GATEWAY_HOST = "127.0.0.1";
|
| 10 |
const startTime = Date.now();
|
| 11 |
const LLM_MODEL = process.env.LLM_MODEL || "Not Set";
|
|
|
|
| 1014 |
if (isDashboardAppRoute(pathname) || isAppRoute(pathname)) {
|
| 1015 |
const proxyPath =
|
| 1016 |
stripDashboardAppPrefix(pathname) + (parsedUrl.search || "");
|
| 1017 |
+
proxyHttp(req, res, proxyPath, GATEWAY_PORT);
|
| 1018 |
return;
|
| 1019 |
}
|
| 1020 |
|
|
|
|
| 1032 |
const parsedUrl = parseRequestUrl(req.url || "/");
|
| 1033 |
const proxyPath =
|
| 1034 |
stripDashboardAppPrefix(pathname) + (parsedUrl.search || "");
|
| 1035 |
+
proxyUpgrade(req, socket, head, proxyPath, GATEWAY_PORT);
|
| 1036 |
return;
|
| 1037 |
}
|
| 1038 |
|
start.sh
CHANGED
|
@@ -193,7 +193,8 @@ CONFIG_JSON=$(cat <<'CONFIGEOF'
|
|
| 193 |
"token": ""
|
| 194 |
},
|
| 195 |
"controlUi": {
|
| 196 |
-
"allowInsecureAuth": true
|
|
|
|
| 197 |
},
|
| 198 |
"trustedProxies": ["127.0.0.1/8", "::1/128", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
|
| 199 |
},
|
|
|
|
| 193 |
"token": ""
|
| 194 |
},
|
| 195 |
"controlUi": {
|
| 196 |
+
"allowInsecureAuth": true,
|
| 197 |
+
"basePath": "/app"
|
| 198 |
},
|
| 199 |
"trustedProxies": ["127.0.0.1/8", "::1/128", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
|
| 200 |
},
|