feat: 去掉跨域,在网关统一做跨域处理

This commit is contained in:
2026-04-02 15:17:46 +08:00
parent e94bcdc4fa
commit b6f9dbcbf6

View File

@@ -22,7 +22,7 @@ type Router struct{}
func (router *Router) BindController(ctx context.Context, group *ghttp.RouterGroup) {
group.Group("/api/v1", func(group *ghttp.RouterGroup) {
//跨域处理,安全起见正式环境请注释该行
//跨域处理,安全起见正式环境请注释该行(在网关统一处理跨域问题)
//group.Middleware(commonService.Middleware().MiddlewareCORS)
group.Middleware(ghttp.MiddlewareHandlerResponse)
// 绑定后台路由