From b054bd67e954dca6a8a1176084eb369a3dff33c3 Mon Sep 17 00:00:00 2001 From: Renato Frota Date: Sat, 16 May 2020 06:48:44 -0300 Subject: [PATCH] Add support to HTTPS -> HTTP proxying (i.e. Cloudflare SSL) --- inc/core/lib/functions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/core/lib/functions.php b/inc/core/lib/functions.php index 89f9bc4..5bd31d9 100644 --- a/inc/core/lib/functions.php +++ b/inc/core/lib/functions.php @@ -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 {