From 3e9e7922b4f8138a2a7d6d680d88be9fe410c0c4 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 19 Dec 2024 15:01:19 +0800 Subject: [PATCH] Update site.py --- web/utils/site.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/utils/site.py b/web/utils/site.py index 5ed12a1963..9f94627ab7 100644 --- a/web/utils/site.py +++ b/web/utils/site.py @@ -1541,8 +1541,7 @@ def setProxy(self, site_name, site_from, to, host, name, open_proxy, open_cors, proxy_cache_key \"$host$uri$is_args$args\";\n\ proxy_cache_valid 200 304 301 302 {cache_time}m;\n\ " - - tpl_proxy_nocache = "\n\ + tpl_proxy_nocache_bak = "\n\ set $static_files_app 0; \n\ if ( $uri ~* \\.(gif|png|jpg|jpeg|css|js|ttf|woff|woff2)$\" )\n\ {\n\ @@ -1554,6 +1553,10 @@ def setProxy(self, site_name, site_from, to, host, name, open_proxy, open_cors, add_header Cache-Control no-cache;\n\ }\n\ " + + tpl_proxy_nocache = "\n\ + add_header Cache-Control no-cache;\n\ +" tpl_proxy_cors = "\n\ add_header Access-Control-Allow-Origin *;\n\ add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';\n\