.Use duplicates its middleware each time a route is called
joshmatz opened this issue · 2 comments
joshmatz commented
When .Use is specified with middleware, the middleware ends up being invoked X times for X amount of request to a particular route.
Example:
/healthcheck receives first request: .Use specified middleware runs 1 time.
/healthcheck receives second request: .Use specified middleware runs 2 times.
/healthcheck receives n request: .Use specified middleware runs n times.
caledhwa commented
Ugh, makes sense. I'll write a test around this and fix it.