🔧 开发代理默认指向本地网关

补充本地网关端口说明,避免误把 Nacos 8080 当作业务网关。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-23 14:49:09 +08:00
parent ae1f2fa09f
commit 694fe1a433
+3 -1
View File
@@ -51,8 +51,10 @@ export default ({ mode, command }) => {
port: 2888, port: 2888,
proxy: { proxy: {
'/api': { '/api': {
// 本地网关默认 80 端口(blade-gateway bootstrap.yml);开发时需先启动网关及 blade-auth/blade-system 等服务
// 注意:本机 8080 一般是 Nacos,不是业务网关
target: 'http://localhost', target: 'http://localhost',
//target: 'https://saber3.bladex.cn/api', // target: 'http://172.16.203.228:8000', // 仅联调远程网关时启用(且不要 rewrite)
changeOrigin: true, changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''), rewrite: path => path.replace(/^\/api/, ''),
}, },