Skip to content

Commit

Permalink
Actually use individual route middleware.
Browse files Browse the repository at this point in the history
We were letting it get defined but not actually using it when serving
content.
  • Loading branch information
paddycarver committed Mar 20, 2024
1 parent f3f48ca commit 2cf3a42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions route.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ func (router Router) route(pieces []string, method string) *route {
}
var ok bool
result.handler, ok = node.methods[method]
result.middleware = node.middleware[method]
if !ok {
result.handler = node.methods[catchAllMethod]
result.middleware = node.middleware[catchAllMethod]
}
return result
}
Expand Down

0 comments on commit 2cf3a42

Please sign in to comment.