Closed louischan-oursky closed 4 years ago
type Middleware interface { Handler(http.Handler) http.Handler } type MiddlewareFunc func(http.Handler) http.Handler func (m MiddlewareFunc) Handler(h http.Handler) http.Handler { return m(h) } func Chain(ms ...Middleware) Middleware { return MiddlewareFunc(func(handler http.Handler) http.Handler { for i = len(ms) - 1; i >= 0; i-- { handler = ms[i].Handler(handler) } return handler }) }
Fixed in https://github.com/authgear/authgear-server/pull/34