Gerasimos (Makis) Maropoulos 1 year ago
parent
commit
4d09475c29
No known key found for this signature in database GPG Key ID: 5DBE766BD26A54E7
  1. 2
      core/router/fs.go

2
core/router/fs.go

@ -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…
Cancel
Save