mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-05-13 15:09:25 +00:00
Upgrade http-proxy to 1.11.1
All xfwd and tests fails with this change, but that's because the tests themselves were incorrect (using port 80/443 instead of the ephemeral ports created for the tests).
This commit is contained in:
@@ -77,11 +77,11 @@ function proxyRequest(req, res, proxy) {
|
||||
var location = req.corsAnywhereRequestState.location;
|
||||
|
||||
req.url = location.path;
|
||||
// Let the "Host" header be the host part of the path (including port, if specified).
|
||||
req.headers.host = location.host;
|
||||
|
||||
// Start proxying the request
|
||||
proxy.web(req, res, {
|
||||
changeOrigin: true,
|
||||
prependPath: false,
|
||||
target: location
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user