From b10bc5b0fb3f0afa29ddc46705f4e38809b29441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=94=B7?= Date: Sun, 26 Apr 2026 22:19:20 +0800 Subject: [PATCH] remove v1 location, keep only /api/v2/ts/ and /api/v2/proc/ --- conf/moicen/proc.conf | 12 ------------ conf/moicen/ts.conf | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/conf/moicen/proc.conf b/conf/moicen/proc.conf index 8f020fa..b59a0ba 100644 --- a/conf/moicen/proc.conf +++ b/conf/moicen/proc.conf @@ -10,18 +10,6 @@ server { set $huiwing_htyproc_rust "127.0.0.1:3004"; # huiwing 仓库 htyproc(Rust) - 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/ { add_header Access-Control-Allow-Origin $http_origin always; add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS' always; diff --git a/conf/moicen/ts.conf b/conf/moicen/ts.conf index f25b742..84ac312 100644 --- a/conf/moicen/ts.conf +++ b/conf/moicen/ts.conf @@ -14,18 +14,6 @@ server { 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; - 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/ { add_header Access-Control-Allow-Origin $http_origin always; add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS' always;