use common name vs http error number

This commit is contained in:
Aaron Bieber 2021-12-12 14:54:26 -07:00
parent 0baef712b2
commit 58e2344566

View File

@ -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
}
}