Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

代理配置优化 #653

Merged
merged 11 commits into from
Dec 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update site.py
midoks committed Dec 19, 2024
commit 3e9e7922b4f8138a2a7d6d680d88be9fe410c0c4
7 changes: 5 additions & 2 deletions web/utils/site.py
Original file line number Diff line number Diff line change
@@ -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\