Use p host to pass the host header

This commit is contained in:
Owen
2026-08-04 16:55:39 -04:00
parent aad26b9ae4
commit 36c0edc62e
2 changed files with 47 additions and 6 deletions
+5 -1
View File
@@ -416,7 +416,11 @@ export async function chatCompletions(
res: Response
): Promise<any> {
try {
const host = (req.headers.host || "").split(":")[0];
const host = (
(req.headers["p-host"] as string | undefined) ||
req.headers.host ||
""
).split(":")[0];
if (!host) {
return res
.status(HttpCode.BAD_REQUEST)