From 056cb446fe98f2d77b2b6bd190630c0da856a3e2 Mon Sep 17 00:00:00 2001 From: Rob Wu Date: Wed, 6 May 2015 12:08:53 +0200 Subject: [PATCH] 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. --- test/test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test.js b/test/test.js index d8e8227..8557d4e 100644 --- a/test/test.js +++ b/test/test.js @@ -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); });