1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-07 20:17:05 +00:00
Gerasimos (Makis) Maropoulos
2020-11-13 20:11:55 +02:00
parent c81b97188a
commit 4d09475c29

View File

@@ -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
}