Merge pull request #79 from renatofrota/flexible_ssl

Add support to HTTPS -> HTTP proxying (i.e. Cloudflare SSL)
This commit is contained in:
Michał Strumpf
2020-05-16 17:12:48 +02:00
committed by GitHub

View File

@@ -222,6 +222,7 @@ function url($data = null)
if ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')
|| isset_or($_SERVER['SERVER_PORT'], null) == 443
|| isset_or($_SERVER['HTTP_X_FORWARDED_PORT'], null) == 443
|| isset_or($_SERVER['HTTP_X_FORWARDED_PROTO'], null) == 'https'
) {
$protocol = 'https://';
} else {