Skip to content

Commit

Permalink
Fixed static middleware serving index.html
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Rana <[email protected]>
  • Loading branch information
vishr committed Apr 22, 2016
1 parent 1247552 commit c830734
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions middleware/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c830734

Please sign in to comment.