I've been reviewing some nginx configuration docs and i found this: http://nginx.org/en/docs/http/request_processing.html I'm specifically reading the section about rejecting requests that don't provide a host name.
I'm wondering how to generate these types of requests for testing purposes, and when would these types of request come in - in real life...aka do i need to care?
What I've tried so far:
I've added the following into my nginx conf file
server {
listen 80;
server_name "";
return 444;
}
Then I tried to play around with curl and send a request with an empty host header like so:
curl --verbose --header 'Host:' 'http://192.1.6.1/test/hello'
That returns the error 400 bad request.