aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2014-02-03 12:46:09 +0100
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2014-02-03 12:46:09 +0100
commit445a1a1c8de78bf7bba3404aa675e6a57ceefbfd (patch)
tree27deb0e5b025702c4c63393d72da33c7a7ef86bf
parent1e1fd6f24da7b7bf08f7b26956a9467477265fff (diff)
downloadwallabag-445a1a1c8de78bf7bba3404aa675e6a57ceefbfd.tar.gz
wallabag-445a1a1c8de78bf7bba3404aa675e6a57ceefbfd.tar.zst
wallabag-445a1a1c8de78bf7bba3404aa675e6a57ceefbfd.zip
[fix] Add support for X-Forwarded-Proto header field #413
-rw-r--r--inc/poche/Tools.class.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index 248a44d7..515a08aa 100644
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -43,7 +43,9 @@ class Tools
43 || (isset($_SERVER["SERVER_PORT"]) 43 || (isset($_SERVER["SERVER_PORT"])
44 && $_SERVER["SERVER_PORT"] == '443') // HTTPS detection. 44 && $_SERVER["SERVER_PORT"] == '443') // HTTPS detection.
45 || (isset($_SERVER["SERVER_PORT"]) //Custom HTTPS port detection 45 || (isset($_SERVER["SERVER_PORT"]) //Custom HTTPS port detection
46 && $_SERVER["SERVER_PORT"] == SSL_PORT); 46 && $_SERVER["SERVER_PORT"] == SSL_PORT)
47 || (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])
48 && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https');
47 49
48 $serverport = (!isset($_SERVER["SERVER_PORT"]) 50 $serverport = (!isset($_SERVER["SERVER_PORT"])
49 || $_SERVER["SERVER_PORT"] == '80' 51 || $_SERVER["SERVER_PORT"] == '80'