Better support for HTTP_X_FORWARDED_PROTO (#2037)

https://github.com/FreshRSS/FreshRSS/issues/2031
pull/2044/head
Alexandre Alapetite 6 years ago committed by GitHub
parent e21585e699
commit ba000d0e08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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 {

Loading…
Cancel
Save