x-forwarded-port should match the request port.

Not the proxied one. These tests will now fail, but that's because
the current implementation is apparently incorrect.
This commit is contained in:
Rob Wu
2015-05-06 12:08:53 +02:00
parent 80da247827
commit 056cb446fe

View File

@@ -231,7 +231,7 @@ describe('Basic functionality', function() {
.expect('Access-Control-Allow-Origin', '*')
.expectJSON({
host: 'example.com:1337',
'x-forwarded-port': '1337',
'x-forwarded-port': '80',
'x-forwarded-proto': 'http',
}, done);
});
@@ -294,7 +294,7 @@ describe('server on https', function() {
.expect('Access-Control-Allow-Origin', '*')
.expectJSON({
host: 'example.com:1337',
'x-forwarded-port': '1337',
'x-forwarded-port': '443',
'x-forwarded-proto': 'https',
}, done);
});