Name: gateway Host: 0.0.0.0 Port: 8888 Log: Encoding: plain Mode: console # 跨域配置 Cors: Enable: true AllowOrigins: - "*" AllowMethods: - GET - POST - PUT - DELETE - OPTIONS AllowHeaders: - Content-Type - Authorization - X-Requested-With - X-Client-Id # system-rpc 连接(用于写入操作日志) SystemRpc: Etcd: Hosts: - 192.168.100.127:2379 Key: system.rpc # JWT 密钥(与 user-api 的 Auth.AccessSecret 一致,用于解析 token 获取 userId) JwtSecret: "9149f2eb-d517-4a50-a03a-231dbcf0d872" # 鉴权白名单(无需 Token 的路径,精确匹配或 /* 前缀通配) AuthWhitelist: - /api/auth/login - /api/auth/loginByPhone - /api/auth/miniLogin - /api/auth/captcha - /api/plant/callback/wechatpay # 上游服务路由表 Upstreams: - Prefix: /api/auth Target: http://192.168.100.2:9001 - Prefix: /api/file Target: http://192.168.100.2:9002 - Prefix: /api/sys Target: http://192.168.100.2:9003 - Prefix: /api/plant Target: http://192.168.100.2:9004