mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-05 20:21:19 +02:00
Use p host to pass the host header
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user