diff options
author | Arthur <arthur@hoa.ro> | 2017-01-04 16:34:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-04 16:34:06 +0100 |
commit | 061f04fba06d2a78246de747e2bdd5625fc22400 (patch) | |
tree | 486bbf6956d44dc93010c3ff38a36691e7218802 /tests/HttpUtils/ServerUrlTest.php | |
parent | 2d3a9be73de8a2e7b38ba0c8af19b940bf376243 (diff) | |
parent | 8e4be773685f7dff074f23e2df13072577091f44 (diff) | |
download | Shaarli-061f04fba06d2a78246de747e2bdd5625fc22400.tar.gz Shaarli-061f04fba06d2a78246de747e2bdd5625fc22400.tar.zst Shaarli-061f04fba06d2a78246de747e2bdd5625fc22400.zip |
Merge pull request #733 from ArthurHoaro/hotfix/reverse-proxy-port
Hide default ports in local URL behind a reverse proxy
Diffstat (limited to 'tests/HttpUtils/ServerUrlTest.php')
-rw-r--r-- | tests/HttpUtils/ServerUrlTest.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/HttpUtils/ServerUrlTest.php b/tests/HttpUtils/ServerUrlTest.php index 8a55a220..7fdad659 100644 --- a/tests/HttpUtils/ServerUrlTest.php +++ b/tests/HttpUtils/ServerUrlTest.php | |||
@@ -69,6 +69,19 @@ class ServerUrlTest extends PHPUnit_Framework_TestCase | |||
69 | ); | 69 | ); |
70 | 70 | ||
71 | $this->assertEquals( | 71 | $this->assertEquals( |
72 | 'https://host.tld', | ||
73 | server_url( | ||
74 | array( | ||
75 | 'HTTPS' => 'Off', | ||
76 | 'SERVER_NAME' => 'host.tld', | ||
77 | 'SERVER_PORT' => '80', | ||
78 | 'HTTP_X_FORWARDED_PROTO' => 'https', | ||
79 | 'HTTP_X_FORWARDED_PORT' => '443' | ||
80 | ) | ||
81 | ) | ||
82 | ); | ||
83 | |||
84 | $this->assertEquals( | ||
72 | 'https://host.tld:4974', | 85 | 'https://host.tld:4974', |
73 | server_url( | 86 | server_url( |
74 | array( | 87 | array( |