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:
parent
954efac63a
commit
166a24fe23
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user