mirror of
https://github.com/labstack/echo.git
synced 2025-01-01 22:09:21 +02:00
Fixed skipper for static middleware (#896)
This commit is contained in:
parent
d67c6f029c
commit
895613fd40
@ -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("*")
|
||||
|
Loading…
Reference in New Issue
Block a user