mirror of
https://github.com/labstack/echo.git
synced 2025-04-23 12:18:53 +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)
|
fs := http.Dir(config.Root)
|
||||||
p := strings.TrimPrefix(c.Request().URL.Path, config.Prefix)
|
p := strings.TrimPrefix(c.Request().URL.Path, config.Prefix)
|
||||||
println(p)
|
|
||||||
file := path.Clean(p)
|
file := path.Clean(p)
|
||||||
f, err := fs.Open(file)
|
f, err := fs.Open(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user