require host header

This commit is contained in:
Jason Swank
2026-05-17 22:18:23 -04:00
parent 43322b40d5
commit 0e871220de

View File

@@ -19,7 +19,7 @@ func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
// error handling for common probes // error handling for common probes
if r.Host == "" { if r.Host == "" {
http.BadRequest(w, r) http.Error(w, "", http.StatusBadRequest)
return return
} }