]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/poche/Tools.class.php
Merge pull request #510 from mariroz/dev
[github/wallabag/wallabag.git] / inc / poche / Tools.class.php
index 248a44d763d5d86719a949e977b802e58d20d29a..4ed28ed1b07a925991feeef349c498369c79cd9b 100644 (file)
@@ -43,7 +43,9 @@ class Tools
             || (isset($_SERVER["SERVER_PORT"])
                     && $_SERVER["SERVER_PORT"] == '443') // HTTPS detection.
             || (isset($_SERVER["SERVER_PORT"]) //Custom HTTPS port detection 
-                    && $_SERVER["SERVER_PORT"] == SSL_PORT);
+                    && $_SERVER["SERVER_PORT"] == SSL_PORT)
+             || (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])
+                    && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https');
 
         $serverport = (!isset($_SERVER["SERVER_PORT"])
             || $_SERVER["SERVER_PORT"] == '80'
@@ -90,7 +92,7 @@ class Tools
     {
         $views = array(
             'install', 'import', 'export', 'config', 'tags',
-            'edit-tags', 'view', 'login', 'error', 'tag'
+            'edit-tags', 'view', 'login', 'error'
             );
 
         if (in_array($view, $views)) {