mirror of
https://github.com/sruupl/batflat.git
synced 2026-01-10 07:52:04 +01:00
Merge pull request #79 from renatofrota/flexible_ssl
Add support to HTTPS -> HTTP proxying (i.e. Cloudflare SSL)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user