diff options
Diffstat (limited to 'pkg/site')
| -rw-r--r-- | pkg/site/fs.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/site/fs.go b/pkg/site/fs.go index 11b36cf..ec57318 100644 --- a/pkg/site/fs.go +++ b/pkg/site/fs.go @@ -50,8 +50,8 @@ func (fs *SiteFileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { } if info.IsDir() { - if !strings.HasSuffix(path, "/") { - http.Redirect(w, r, path+"/", http.StatusTemporaryRedirect) + if !strings.HasSuffix(r.URL.Path, "/") { + http.Redirect(w, r, path+"/", http.StatusFound) return } indexPath := filepath.Join(path, "index.html") |
