fix: route /api/v1/ts/ and /api/v1/proc/ to Rust, remove Java upstream

This commit is contained in:
2026-04-26 22:16:49 +08:00
parent 9c111492f1
commit ec34b450e1
2 changed files with 2 additions and 5 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ server {
if ($request_method = 'OPTIONS') {
return 200;
}
proxy_pass http://127.0.0.1:8880/api/v1/proc/;
proxy_pass http://$huiwing_htyproc_rust/api/v1/proc/;
}
location /api/v2/proc/ {
+1 -4
View File
@@ -10,14 +10,11 @@ server {
ssl_certificate /etc/letsencrypt/live/moicen.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/moicen.com/privkey.pem; # managed by Certbot
set $task_server "http://127.0.0.1:8080"; # Java task_server
set $huiwing_htyts_rust "127.0.0.1:3003"; # huiwing 仓库 htytsRust
set $task_server_rust "http://$huiwing_htyts_rust";
set $htyuc "http://127.0.0.1:3000"; #htyuc host
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;
@@ -26,7 +23,7 @@ server {
if ($request_method = 'OPTIONS') {
return 200;
}
proxy_pass http://127.0.0.1:8080/api/v1/ts/;
proxy_pass http://$huiwing_htyts_rust/api/v1/ts/;
}
location /api/v2/ts/ {