From 90c9948c7943a891554f5b65046f44cb720663c4 Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 15 May 2024 16:53:03 +0800 Subject: [PATCH] new --- nginx/default.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nginx/default.conf b/nginx/default.conf index 376b948..4154f82 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -10,7 +10,8 @@ server { # API转发 location /api { - proxy_pass http://192.168.202.220:9100/; # 将 /api 的请求转发到 http://127.0.0.1:9100 + rewrite ^/api(.*)$ $1 break; + proxy_pass http://gateway:9100; # 将 /api 的请求转发到 http://127.0.0.1:9100 proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;