diff --git a/apps/gateway/assets/nginx.conf b/apps/gateway/assets/nginx.conf index f3c5c6656b..357542acac 100644 --- a/apps/gateway/assets/nginx.conf +++ b/apps/gateway/assets/nginx.conf @@ -39,6 +39,16 @@ server { include includes/websocket; } +# ai中将/v1/ai/xxx,重写成/ai/v1/xxx并代理到/ai/v1/xxx + location ${BASE_PATH}v1${AI_PATH} { + rewrite ^${BASE_PATH}v1${AI_PATH}/(.*) ${AI_PATH}/v1/$1 break; + set $ai_path_url ${AI_PATH_INTERNAL_URL}; + proxy_pass $ai_path_url; + + include includes/headers; + include includes/websocket; + } + location ${BASE_PATH}${VNC_PATH} { proxy_pass ${NOVNC_INTERNAL_URL}; @@ -57,6 +67,14 @@ server { include includes/headers; } + #在auth中public接口也加上前缀v1 + location ~ ^${BASE_PATH}/v1/auth/public/(.*) { + set $auth ${AUTH_URL}; + proxy_pass $auth/public/$1?$args; + + include includes/headers; + } + error_page 500 502 503 504 /50x.html; location = /__basic_status__ {