remove v1 location, keep only /api/v2/ts/ and /api/v2/proc/
This commit is contained in:
@@ -10,18 +10,6 @@ server {
|
|||||||
|
|
||||||
set $huiwing_htyproc_rust "127.0.0.1:3004"; # huiwing 仓库 htyproc(Rust)
|
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/ {
|
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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user