require host header
This commit is contained in:
2
main.go
2
main.go
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user