Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Sep 3, 2024
1 parent df61cd1 commit 9c2187e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/initMiddleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func assembledPipeline(route *context.HttpRoute, lstMiddleware collections.List[
// 添加用户自定义中间件
for i := 0; i < lstMiddleware.Count(); i++ {
middlewareType := reflect.TypeOf(lstMiddleware.Index(i)).Elem()
if route.Schema != "ws" && middlewareType.String() != "middleware.ApiResponse" {
if route.Schema != "ws" || middlewareType.String() != "middleware.ApiResponse" {
valIns := reflect.New(middlewareType).Interface()
lst.Add(valIns.(context.IMiddleware))
}
Expand Down

0 comments on commit 9c2187e

Please sign in to comment.