Add support to HTTPS -> HTTP proxying (i.e. Cloudflare SSL)

This commit is contained in:
Renato Frota
2020-05-16 06:48:44 -03:00
parent eac3bcb831
commit b054bd67e9

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 {