mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-22 21:28:12 +02:00
refactor(web): route server proxies through SURFSENSE_BACKEND_INTERNAL_URL
This commit is contained in:
parent
2da4a29a4d
commit
9ef2c6a60e
3 changed files with 88 additions and 6 deletions
|
|
@ -14,7 +14,11 @@ const HOP_BY_HOP_HEADERS = new Set([
|
|||
]);
|
||||
|
||||
function getBackendBaseUrl() {
|
||||
const base = process.env.FASTAPI_BACKEND_INTERNAL_URL || "http://localhost:8000";
|
||||
const base =
|
||||
process.env.SURFSENSE_BACKEND_INTERNAL_URL ||
|
||||
// TODO: Remove FASTAPI_BACKEND_INTERNAL_URL after the post-Caddy env migration window.
|
||||
process.env.FASTAPI_BACKEND_INTERNAL_URL ||
|
||||
"http://backend:8000";
|
||||
return base.endsWith("/") ? base.slice(0, -1) : base;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue