Compare commits
3 Commits
b1106c1115
...
b6f9dbcbf6
| Author | SHA1 | Date | |
|---|---|---|---|
| b6f9dbcbf6 | |||
| e94bcdc4fa | |||
| b265e2029e |
@@ -9,9 +9,9 @@ package router
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/gogf/gf/v2/net/ghttp"
|
"github.com/gogf/gf/v2/net/ghttp"
|
||||||
commonRouter "github.com/tiger1103/gfast/v3/internal/app/common/router"
|
commonRouter "github.com/tiger1103/gfast/v3/internal/app/common/router"
|
||||||
commonService "github.com/tiger1103/gfast/v3/internal/app/common/service"
|
|
||||||
systemRouter "github.com/tiger1103/gfast/v3/internal/app/system/router"
|
systemRouter "github.com/tiger1103/gfast/v3/internal/app/system/router"
|
||||||
"github.com/tiger1103/gfast/v3/library/libRouter"
|
"github.com/tiger1103/gfast/v3/library/libRouter"
|
||||||
)
|
)
|
||||||
@@ -22,8 +22,8 @@ type Router struct{}
|
|||||||
|
|
||||||
func (router *Router) BindController(ctx context.Context, group *ghttp.RouterGroup) {
|
func (router *Router) BindController(ctx context.Context, group *ghttp.RouterGroup) {
|
||||||
group.Group("/api/v1", func(group *ghttp.RouterGroup) {
|
group.Group("/api/v1", func(group *ghttp.RouterGroup) {
|
||||||
//跨域处理,安全起见正式环境请注释该行
|
//跨域处理,安全起见正式环境请注释该行(在网关统一处理跨域问题)
|
||||||
group.Middleware(commonService.Middleware().MiddlewareCORS)
|
//group.Middleware(commonService.Middleware().MiddlewareCORS)
|
||||||
group.Middleware(ghttp.MiddlewareHandlerResponse)
|
group.Middleware(ghttp.MiddlewareHandlerResponse)
|
||||||
// 绑定后台路由
|
// 绑定后台路由
|
||||||
systemRouter.R.BindController(ctx, group)
|
systemRouter.R.BindController(ctx, group)
|
||||||
|
|||||||
Reference in New Issue
Block a user