diff options
| author | 2018-10-01 00:01:33 +0200 | |
|---|---|---|
| committer | 2018-10-01 00:01:33 +0200 | |
| commit | ba000d0e086155e8678e013215bf1bec3deadb6e (patch) | |
| tree | 152a8dceecd6e81a19fb6054a509d69ae4acf2c2 /lib/Minz/Request.php | |
| parent | e21585e6995fbe9505bc5bb1cc949139bbe25081 (diff) | |
Better support for HTTP_X_FORWARDED_PROTO (#2037)
https://github.com/FreshRSS/FreshRSS/issues/2031
Diffstat (limited to 'lib/Minz/Request.php')
| -rw-r--r-- | lib/Minz/Request.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php index e21697e42..24e30546f 100644 --- a/lib/Minz/Request.php +++ b/lib/Minz/Request.php @@ -129,6 +129,8 @@ class Minz_Request { if (!empty($_SERVER['HTTP_X_FORWARDED_PORT'])) { $port = intval($_SERVER['HTTP_X_FORWARDED_PORT']); + } elseif (!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) { + $port = strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https' ? 443 : 80; } elseif (!empty($_SERVER['SERVER_PORT'])) { $port = intval($_SERVER['SERVER_PORT']); } else { |
