Parcourir la source

fix http and https check (#1154)

causefx il y a 7 ans
Parent
commit
ce7913df7b
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      api/functions/normal-functions.php

+ 1 - 1
api/functions/normal-functions.php

@@ -82,7 +82,7 @@ function coookie($type, $name, $value = '', $days = -1, $http = true)
 	if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == "https") {
 		$Secure = true;
 		$HTTPOnly = true;
-	} elseif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
+	} elseif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' && $_SERVER['HTTPS'] !== '') {
 		$Secure = true;
 		$HTTPOnly = true;
 	} else {