ソースを参照

fix http and https check (#1154)

causefx 7 年 前
コミット
ce7913df7b
1 ファイル変更1 行追加1 行削除
  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") {
 	if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == "https") {
 		$Secure = true;
 		$Secure = true;
 		$HTTPOnly = true;
 		$HTTPOnly = true;
-	} elseif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
+	} elseif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' && $_SERVER['HTTPS'] !== '') {
 		$Secure = true;
 		$Secure = true;
 		$HTTPOnly = true;
 		$HTTPOnly = true;
 	} else {
 	} else {