mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-05-13 23:16:51 +00:00
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:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user