package config import ( "github.com/zeromicro/go-zero/gateway" "github.com/zeromicro/go-zero/zrpc" ) // Config zero-gateway 配置,嵌入官方 GatewayConf type Config struct { gateway.GatewayConf // system-rpc 连接(用于写入操作日志) SystemRpc zrpc.RpcClientConf // JWT 密钥(与各 API 服务 Auth.AccessSecret 一致,用于网关层鉴权) JwtSecret string `json:",optional"` // 跨域配置 Cors struct { AllowOrigins []string AllowMethods []string AllowHeaders []string } // 无需鉴权的路径白名单(精确匹配) AuthWhitelist []string `json:",optional"` }