From 27fd93f590f16dd5d0f32edefbc4c628f97bf9fd Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 19 Dec 2024 14:09:25 +0800 Subject: [PATCH] Update site.py --- web/utils/site.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/web/utils/site.py b/web/utils/site.py index 93864f46b..8ba331085 100644 --- a/web/utils/site.py +++ b/web/utils/site.py @@ -1555,13 +1555,12 @@ location ^~ {from} {\n \ }\n\ " tpl_proxy_cors = "\n\ - add_header Access-Control-Allow-Origin *;\ - add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';\ - add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';\ - add_header X-Cache $upstream_cache_status;\ - if ($request_method = 'OPTIONS') {\ - return 204;\ - }\ + add_header Access-Control-Allow-Origin *;\n\ + add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';\n\ + add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';\n\ + if ($request_method = 'OPTIONS') {\n\ + return 204;\n\ + }\n\ " # replace