use common name vs http error number
This commit is contained in:
parent
0baef712b2
commit
58e2344566
2
main.go
2
main.go
@ -378,7 +378,7 @@ func main() {
|
|||||||
// because net/http handles index.html magically for FileServer
|
// because net/http handles index.html magically for FileServer
|
||||||
_, fErr := os.Stat(filepath.Clean(path.Join(userPath, "index.html")))
|
_, fErr := os.Stat(filepath.Clean(path.Join(userPath, "index.html")))
|
||||||
if !os.IsNotExist(fErr) {
|
if !os.IsNotExist(fErr) {
|
||||||
http.Redirect(w, r, "/index.html", 301)
|
http.Redirect(w, r, "/index.html", http.StatusMovedPermanently)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user