Add default case to router

oauth2
maru 2024-04-24 18:54:24 -04:00
parent 7b9a866570
commit da572ebdd9
No known key found for this signature in database
GPG Key ID: 37689350E9CD0F0D
1 changed files with 3 additions and 0 deletions

View File

@ -311,6 +311,9 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
w.Write([]byte(strconv.Itoa(count)))
default:
httpError(w, r, fmt.Errorf("unknown endpoint"), http.StatusNotFound)
return
}
}