3fbe5e900a
- ts.conf/proc.conf: v2 locations and huiwing_htyts_rust/htyproc_rust vars - admin.conf: /api/v2/ts and /api/v2/proc on admin for same-origin tests - local_macos proc.conf; remove duplicate conf/alchemy - huiwings ai.conf: coze auth comment lines merged from removed alchemy copy Made-with: Cursor
32 lines
1.4 KiB
Plaintext
32 lines
1.4 KiB
Plaintext
server {
|
||
server_name "proc.localhost";
|
||
listen 8088;
|
||
client_max_body_size 10M;
|
||
|
||
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://127.0.0.1:8880/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;
|
||
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/;
|
||
}
|
||
}
|