Skip to content

Commit

Permalink
use common name vs http error number
Browse files Browse the repository at this point in the history
  • Loading branch information
qbit committed Dec 12, 2021
1 parent 0baef71 commit 58e2344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 58e2344

Please sign in to comment.