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
Next Next commit
Update site.py
midoks committed Dec 19, 2024
commit 27fd93f590f16dd5d0f32edefbc4c628f97bf9fd
13 changes: 6 additions & 7 deletions web/utils/site.py
Original file line number Diff line number Diff line change
@@ -1555,13 +1555,12 @@ def setProxy(self, site_name, site_from, to, host, name, open_proxy, open_cors,
}\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