@exulu/backend 1.63.1 → 1.63.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -17121,13 +17121,13 @@ ${style.markdown}` : params.prompt;
|
|
|
17121
17121
|
redirect: "manual"
|
|
17122
17122
|
});
|
|
17123
17123
|
res.status(upstream.status);
|
|
17124
|
-
const upstreamOrigin = `http://${host}:${port}`;
|
|
17125
17124
|
upstream.headers.forEach((value, name) => {
|
|
17126
17125
|
const lower = name.toLowerCase();
|
|
17127
17126
|
if (lower === "content-encoding" || lower === "content-length" || lower === "transfer-encoding" || lower === "connection")
|
|
17128
17127
|
return;
|
|
17129
17128
|
if (lower === "location") {
|
|
17130
|
-
|
|
17129
|
+
const absolute = value.match(/^https?:\/\/[^/]+(\/.*)?$/);
|
|
17130
|
+
let loc = absolute ? absolute[1] ?? "/" : value;
|
|
17131
17131
|
if (loc.startsWith("/") && loc !== litellmUiPath && !loc.startsWith(`${litellmUiPath}/`)) {
|
|
17132
17132
|
loc = `${litellmUiPath}${loc}`;
|
|
17133
17133
|
}
|
package/dist/index.js
CHANGED
|
@@ -9117,13 +9117,13 @@ ${style.markdown}` : params.prompt;
|
|
|
9117
9117
|
redirect: "manual"
|
|
9118
9118
|
});
|
|
9119
9119
|
res.status(upstream.status);
|
|
9120
|
-
const upstreamOrigin = `http://${host}:${port}`;
|
|
9121
9120
|
upstream.headers.forEach((value, name) => {
|
|
9122
9121
|
const lower = name.toLowerCase();
|
|
9123
9122
|
if (lower === "content-encoding" || lower === "content-length" || lower === "transfer-encoding" || lower === "connection")
|
|
9124
9123
|
return;
|
|
9125
9124
|
if (lower === "location") {
|
|
9126
|
-
|
|
9125
|
+
const absolute = value.match(/^https?:\/\/[^/]+(\/.*)?$/);
|
|
9126
|
+
let loc = absolute ? absolute[1] ?? "/" : value;
|
|
9127
9127
|
if (loc.startsWith("/") && loc !== litellmUiPath && !loc.startsWith(`${litellmUiPath}/`)) {
|
|
9128
9128
|
loc = `${litellmUiPath}${loc}`;
|
|
9129
9129
|
}
|