mirror of
https://github.com/kataras/iris.git
synced 2025-03-15 04:06:25 +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
|
// index requested, send a moved permanently status
|
||||||
// and navigate back to the route without the index suffix.
|
// 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, "./")
|
localRedirect(ctx, "./")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user