Add 404 for nonexistent pages
This commit is contained in:
parent
46d18a018e
commit
8b0242419d
|
@ -75,6 +75,7 @@ func main() {
|
||||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
if r.URL.Path != "/" {
|
if r.URL.Path != "/" {
|
||||||
http.NotFound(w, r)
|
http.NotFound(w, r)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update servers with current data
|
// Update servers with current data
|
||||||
|
|
Loading…
Reference in a new issue