From 58e23445668a58e894fe96b881b6ea8a1427b58a Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Sun, 12 Dec 2021 14:54:26 -0700 Subject: [PATCH] use common name vs http error number --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 9b294e5..496c6a5 100644 --- a/main.go +++ b/main.go @@ -378,7 +378,7 @@ func main() { // because net/http handles index.html magically for FileServer _, fErr := os.Stat(filepath.Clean(path.Join(userPath, "index.html"))) if !os.IsNotExist(fErr) { - http.Redirect(w, r, "/index.html", 301) + http.Redirect(w, r, "/index.html", http.StatusMovedPermanently) return } }