前端接口改走同源 /api 反向代理
next.config.ts 加 rewrites 把 /api/* 转发到内网 backend:8104;前端 API_BASE 默认改为 /api;docker-compose 移除 NEXT_PUBLIC_API_URL,改用运行时 BACKEND_INTERNAL_URL。避免暴露 8104、跨域及 https mixed-content。
Showing
4 changed files
with
12 additions
and
5 deletions
-
Please register or sign in to post a comment