mirror of
https://github.com/kataras/iris.git
synced 2025-03-13 21:36:28 +01:00
This commit is contained in:
parent
c81b97188a
commit
4d09475c29
|
@ -284,7 +284,7 @@ func FileServer(fs http.FileSystem, options DirOptions) context.Handler {
|
|||
|
||||
// index requested, send a moved permanently status
|
||||
// and navigate back to the route without the index suffix.
|
||||
if !noRedirect && strings.HasSuffix(name, options.IndexName) {
|
||||
if !noRedirect && options.IndexName != "" && strings.HasSuffix(name, options.IndexName) {
|
||||
localRedirect(ctx, "./")
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user