1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-28 08:38:39 +02:00

static middleware strip prefix config

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-10-22 15:22:18 -07:00
parent 954efac63a
commit 166a24fe23

View File

@ -74,7 +74,6 @@ func StaticWithConfig(config StaticConfig) echo.MiddlewareFunc {
fs := http.Dir(config.Root)
p := strings.TrimPrefix(c.Request().URL.Path, config.Prefix)
println(p)
file := path.Clean(p)
f, err := fs.Open(file)
if err != nil {