1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-30 12:52:24 -05:00

[fix] Add support for X-Forwarded-Proto header field #413

This commit is contained in:
Nicolas Lœuillet 2014-02-03 12:46:09 +01:00
parent 1e1fd6f24d
commit 445a1a1c8d

View File

@ -43,7 +43,9 @@ class Tools
|| (isset($_SERVER["SERVER_PORT"]) || (isset($_SERVER["SERVER_PORT"])
&& $_SERVER["SERVER_PORT"] == '443') // HTTPS detection. && $_SERVER["SERVER_PORT"] == '443') // HTTPS detection.
|| (isset($_SERVER["SERVER_PORT"]) //Custom HTTPS port 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"]) $serverport = (!isset($_SERVER["SERVER_PORT"])
|| $_SERVER["SERVER_PORT"] == '80' || $_SERVER["SERVER_PORT"] == '80'