From 8d5476c698a39fd65a5c5c2b877ed585702482ce Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 29 May 2024 11:04:53 +0800 Subject: [PATCH] * Fix bug #49807. --- module/common/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/common/model.php b/module/common/model.php index b3632219db..a2e82460e0 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1194,7 +1194,7 @@ class commonModel extends model * 忽略无请求头 HTTP_SEC_FETCH_DEST 或者 HTTP_SEC_FETCH_DEST 为 iframe 的请求,较新的浏览器在启用 https 的情况下才会正确发送该请求头。 * Ignore the request without HTTP_SEC_FETCH_DEST or HTTP_SEC_FETCH_DEST is iframe, the latest browser will send this request header correctly when enable https. */ - if(!isset($_SERVER['HTTP_SEC_FETCH_DEST']) || $_SERVER['HTTP_SEC_FETCH_DEST'] == 'iframe') return true; + if(isHttps() && (!isset($_SERVER['HTTP_SEC_FETCH_DEST']) || $_SERVER['HTTP_SEC_FETCH_DEST'] == 'iframe')) return true; /** * 当有 HTTP_REFERER 请求头时,忽略 safari 浏览器,因为 safari 浏览器不会正确发送 HTTP_SEC_FETCH_DEST 请求头。