remove v1 location, keep only /api/v2/ts/ and /api/v2/proc/

This commit is contained in:
2026-04-26 22:19:20 +08:00
parent ec34b450e1
commit b10bc5b0fb
2 changed files with 0 additions and 24 deletions
-12
View File
@@ -10,18 +10,6 @@ server {
set $huiwing_htyproc_rust "127.0.0.1:3004"; # huiwing 仓库 htyprocRust set $huiwing_htyproc_rust "127.0.0.1:3004"; # huiwing 仓库 htyprocRust
location /api/v1/proc/ {
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;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Max-Age 86400 always;
if ($request_method = 'OPTIONS') {
return 200;
}
proxy_pass http://$huiwing_htyproc_rust/api/v1/proc/;
}
location /api/v2/proc/ { location /api/v2/proc/ {
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-Methods 'GET, POST, OPTIONS' always;
-12
View File
@@ -14,18 +14,6 @@ server {
set $htyuc "http://127.0.0.1:3000"; #htyuc host set $htyuc "http://127.0.0.1:3000"; #htyuc host
set $resty_loc "/usr/local/openresty"; set $resty_loc "/usr/local/openresty";
location /api/v1/ts/ {
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;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Max-Age 86400 always;
if ($request_method = 'OPTIONS') {
return 200;
}
proxy_pass http://$huiwing_htyts_rust/api/v1/ts/;
}
location /api/v2/ts/ { location /api/v2/ts/ {
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-Methods 'GET, POST, OPTIONS' always;