mirror of
https://github.com/movie-web/simple-proxy.git
synced 2025-09-13 09:13:27 +00:00
fix: Add host header to proxy request
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user