Hide default port in local URL behind a reverse proxy
This commit is contained in:
parent
436479c58f
commit
8e4be77368
2 changed files with 23 additions and 2 deletions
tests/HttpUtils
|
@ -68,6 +68,19 @@ class ServerUrlTest extends PHPUnit_Framework_TestCase
|
|||
)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
'https://host.tld',
|
||||
server_url(
|
||||
array(
|
||||
'HTTPS' => 'Off',
|
||||
'SERVER_NAME' => 'host.tld',
|
||||
'SERVER_PORT' => '80',
|
||||
'HTTP_X_FORWARDED_PROTO' => 'https',
|
||||
'HTTP_X_FORWARDED_PORT' => '443'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
'https://host.tld:4974',
|
||||
server_url(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue