From 2cf3a42037d43546665454bc9a5191f8d285e70f Mon Sep 17 00:00:00 2001 From: Paddy Carver Date: Wed, 20 Mar 2024 01:39:34 -0700 Subject: [PATCH] Actually use individual route middleware. We were letting it get defined but not actually using it when serving content. --- route.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/route.go b/route.go index d68bc9f..c42f6a4 100644 --- a/route.go +++ b/route.go @@ -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 }