]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/HttpUtils/ServerUrlTest.php
Fixes #477: support multi reverse proxy with comma syntax
[github/shaarli/Shaarli.git] / tests / HttpUtils / ServerUrlTest.php
index 5096db653bda40498ddb4fcf1006cf347d15b252..8a55a2202be11910e9dcb22c38f60554820efbc3 100644 (file)
@@ -67,6 +67,19 @@ class ServerUrlTest extends PHPUnit_Framework_TestCase
                 )
             )
         );
+
+        $this->assertEquals(
+            'https://host.tld:4974',
+            server_url(
+                array(
+                    'HTTPS' => 'Off',
+                    'SERVER_NAME' => 'host.tld',
+                    'SERVER_PORT' => '80',
+                    'HTTP_X_FORWARDED_PROTO' => 'https, https',
+                    'HTTP_X_FORWARDED_PORT' => '4974, 80'
+                )
+            )
+        );
     }
 
     /**