mirror of
https://github.com/labstack/echo.git
synced 2025-07-05 00:58:47 +02:00
@ -61,7 +61,7 @@ func StaticFromConfig(config StaticConfig) echo.MiddlewareFunc {
|
||||
if fi.IsDir() {
|
||||
/* NOTE:
|
||||
Not checking the Last-Modified header as it caches the response `304` when
|
||||
changing differnt directories for the same path.
|
||||
changing different directories for the same path.
|
||||
*/
|
||||
d := f
|
||||
|
||||
@ -97,9 +97,8 @@ func StaticFromConfig(config StaticConfig) echo.MiddlewareFunc {
|
||||
}
|
||||
return next.Handle(c)
|
||||
}
|
||||
fi, _ = f.Stat() // Index file stat
|
||||
}
|
||||
return echo.ServeContent(c.Request(), c.Response(), f, fi)
|
||||
return c.ServeContent(f)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user