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:
Rob Wu
2015-05-06 19:19:21 +02:00
parent f98705f27b
commit 2d84862546
3 changed files with 4 additions and 4 deletions

View File

@@ -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
});
}

View File

@@ -21,7 +21,7 @@
],
"main": "./lib/cors-anywhere.js",
"dependencies": {
"http-proxy": "1.3.0"
"http-proxy": "1.11.1"
},
"devDependencies": {
"mocha": "~2.2.4",

View File

@@ -390,8 +390,8 @@ describe('removeHeaders', function() {
.set('cookie3', 'c')
.expect('Access-Control-Allow-Origin', '*')
.expectJSON({
host: 'example.com',
cookie3: 'c',
host: 'example.com',
}, done);
});
});