mirror of
https://github.com/labstack/echo.git
synced 2025-06-04 23:37:45 +02:00
Support for nested folder #100
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
d04651dc2a
commit
fb0a5072b6
3
echo.go
3
echo.go
@ -338,7 +338,8 @@ func serveFile(dir, file string, c *Context) error {
|
|||||||
|
|
||||||
fi, _ := f.Stat()
|
fi, _ := f.Stat()
|
||||||
if fi.IsDir() {
|
if fi.IsDir() {
|
||||||
f, err = fs.Open("index.html")
|
file = filepath.Join(file, "index.html")
|
||||||
|
f, err = fs.Open(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return NewHTTPError(http.StatusForbidden)
|
return NewHTTPError(http.StatusForbidden)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user