Add 404 handler for not-index
This commit is contained in:
parent
2c078285b8
commit
46d18a018e
|
@ -73,6 +73,9 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
if r.URL.Path != "/" {
|
||||||
|
http.NotFound(w, r)
|
||||||
|
}
|
||||||
|
|
||||||
// Update servers with current data
|
// Update servers with current data
|
||||||
for i, s := range config.Servers {
|
for i, s := range config.Servers {
|
||||||
|
|
Loading…
Reference in a new issue