From 08e3767d6b9bbc01f90c74960766526d76395c7e Mon Sep 17 00:00:00 2001 From: lewis_yan Date: Wed, 1 Apr 2026 11:47:40 +0800 Subject: [PATCH] chore: use /api proxy in web .env.production Switch VITE_API_URL from direct backend URL to /api proxy, allowing nginx to handle routing to the backend container. --- web/.env.production | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/web/.env.production b/web/.env.production index 2764313..f60a9ca 100644 --- a/web/.env.production +++ b/web/.env.production @@ -2,10 +2,5 @@ ENV = 'production' # 线上环境接口地址 -# 说明:项目内接口多以 /api/... 作为绝对路径(如 /api/captcha/、/api/init/settings/)。 -# 因此 baseURL 不应再额外带 /api,避免拼接成 /api/api/... -# VITE_API_URL = '/' -VITE_API_URL = 'http://192.168.80.90:8000' - -# 是否启用按钮权限 -VITE_PM_ENABLED = true +# 使用 /api 代理,由 nginx 转发请求到后端容器 +VITE_API_URL = '/api'