1
0
mirror of https://github.com/prasathmani/tinyfilemanager.git synced 2025-10-07 13:26:22 +02:00

fix: 部分虚拟机提供商的HTTPS值为ON,导致['HTTPS'] == 'on'失效,转换为小写后比较 (#1344)

This commit is contained in:
Annun
2025-09-23 11:24:58 +08:00
committed by GitHub
parent 645d09a6ef
commit cc3426aebe

View File

@@ -257,7 +257,7 @@ if (empty($auth_users)) {
$use_auth = false;
}
$is_https = isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1)
$is_https = isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on' || $_SERVER['HTTPS'] == 1)
|| isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https';
// update $root_url based on user specific directories