update proxy setting

This commit is contained in:
moicen
2022-09-04 01:23:20 +08:00
parent 7060c7d373
commit 68af177368
+2 -3
View File
@@ -18,14 +18,13 @@ server {
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $remote_addr;
proxy_pass_request_headers on;
}
location /api/v1/index {
return 200 "Ai api index";
}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS' always;
add_header Access-Control-Allow-Headers 'Authorization,unionid,HtySudoerToken,HtyHost,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type' always;
add_header Access-Control-Allow-Credentials true always;
@@ -35,7 +34,7 @@ server {
}
location /api/v1/ai/ {
proxy_set_header Host $host;
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS' always;
add_header Access-Control-Allow-Headers 'Authorization,HtyAdminToken,HtySudoerToken,HtyHost,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type' always;