diff --git a/test/lib-http-proxy-passes-web-incoming-test.js b/test/lib-http-proxy-passes-web-incoming-test.js index 19fa669..b25ad6e 100644 --- a/test/lib-http-proxy-passes-web-incoming-test.js +++ b/test/lib-http-proxy-passes-web-incoming-test.js @@ -34,7 +34,9 @@ describe('lib/http-proxy/passes/web.js', function() { remoteAddress: '192.168.1.2', remotePort: '8080' }, - headers: {} + headers: { + host: '192.168.1.2:8080' + } } it('set the correct x-forwarded-* headers', function () { @@ -88,11 +90,11 @@ describe('#createProxyServer.web() using own http server', function () { }); } - proxyServer.listen('8081'); + proxyServer.listen('8082'); http.request({ hostname: '127.0.0.1', - port: '8081', + port: '8082', method: 'GET', }, function() {}).end(); }); @@ -117,11 +119,11 @@ describe('#createProxyServer.web() using own http server', function () { proxy.web(req, res); } - proxyServer.listen('8081'); + proxyServer.listen('8083'); http.request({ hostname: '127.0.0.1', - port: '8081', + port: '8083', method: 'GET', }, function() {}).end(); }); diff --git a/test/lib-http-proxy-passes-ws-incoming-test.js b/test/lib-http-proxy-passes-ws-incoming-test.js index 2f696c7..bfed888 100644 --- a/test/lib-http-proxy-passes-ws-incoming-test.js +++ b/test/lib-http-proxy-passes-ws-incoming-test.js @@ -88,7 +88,9 @@ describe('lib/http-proxy/passes/ws-incoming.js', function () { remoteAddress: '192.168.1.2', remotePort: '8080' }, - headers: {} + headers: { + host: '192.168.1.2:8080' + } } httpProxy.XHeaders(stubRequest, {}, { xfwd: true }); expect(stubRequest.headers['x-forwarded-for']).to.be('192.168.1.2'); @@ -105,7 +107,9 @@ describe('lib/http-proxy/passes/ws-incoming.js', function () { connection: { pair: true }, - headers: {} + headers: { + host: '192.168.1.3:8181' + } }; httpProxy.XHeaders(stubRequest, {}, { xfwd: true }); expect(stubRequest.headers['x-forwarded-for']).to.be('192.168.1.3');