fix: Add host header to proxy request

This commit is contained in:
Isra 2023-09-09 04:22:06 -05:00
parent 4d876b3298
commit 3936dd0765
1 changed files with 2 additions and 0 deletions

View File

@ -34,7 +34,9 @@ async function handleRequest(
method: requestData.method, method: requestData.method,
body: requestData.body, body: requestData.body,
}); });
request.headers.set("Origin", new URL(requestData.destination).origin); request.headers.set("Origin", new URL(requestData.destination).origin);
request.headers.set("Host", new URL(requestData.destination).host);
// TODO: Make cookie handling better. PHPSESSID overwrites all other cookie related headers // TODO: Make cookie handling better. PHPSESSID overwrites all other cookie related headers