diff --git a/middleware/static.go b/middleware/static.go index a0e637a7..37fd444b 100644 --- a/middleware/static.go +++ b/middleware/static.go @@ -67,6 +67,10 @@ func StaticWithConfig(config StaticConfig) echo.MiddlewareFunc { return func(next echo.HandlerFunc) echo.HandlerFunc { return func(c echo.Context) error { + if config.Skipper(c) { + return next(c) + } + p := c.Request().URL.Path if strings.HasSuffix(c.Path(), "*") { // When serving from a group, e.g. `/static*`. p = c.Param("*")