mirror of
https://github.com/labstack/echo.git
synced 2025-03-19 21:17:58 +02:00
Fixed static middleware serving index.html
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
1247552c9b
commit
c830734fd5
@ -80,10 +80,7 @@ func StaticWithConfig(config StaticConfig) echo.MiddlewareFunc {
|
||||
// TODO: search all files
|
||||
file = path.Join(file, config.Index[0])
|
||||
f, err = fs.Open(file)
|
||||
if err != nil {
|
||||
return next(c)
|
||||
}
|
||||
if config.Browse {
|
||||
if err != nil && config.Browse {
|
||||
dirs, err := d.Readdir(-1)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
x
Reference in New Issue
Block a user