feat(moicen): add location /api/v1/coze/ for coze_fastapi proxy (issue #182)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -41,4 +41,18 @@ server {
|
||||
|
||||
proxy_pass http://127.0.0.1:5000/;
|
||||
}
|
||||
|
||||
location /api/v1/coze/ {
|
||||
proxy_set_header Host $host;
|
||||
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:6000/;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user