On our company servers due to security purposes our main SysAdmin only allows a few HTTP methods to pass through like (GET, POST, OPTIONS, PUT, etc.) and HEAD is not one of them.
I implemented Zabbix Monitoring on them to check if it pings correctly and if domain is down or not. What I do now is getting all response header and response body and check if it returns 200 OK or not.
The problem is due to many requests per second and timeouts I get lots of false errors therefore I don't want to waste my bandwidth to fetch all response header and response body just to check if a website is down or not and because of HEAD not allowed I can't do something like curl -I (which sends a HEAD HTTP request and only fetches response header so I could check if it returns 200 OK).
How can I send GET HTTP request but only fetch response header via curl?
curl --connect-timeout 60 -v -I -X GET -A "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" "https://google.com" 2>&1 | egrep -v '^> |^< |^{|^}|^* TLS|^* AL|^ 0'