Add 404 handler for not-index

This commit is contained in:
Chandler Swift 2023-10-12 22:02:59 -05:00
parent 2c078285b8
commit 46d18a018e
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F

View file

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