Gerasimos (Makis) Maropoulos 2020-11-13 20:11:55 +02:00
parent c81b97188a
commit 4d09475c29
No known key found for this signature in database
GPG Key ID: 5DBE766BD26A54E7

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
}