- marked as enhancement
check https response header
Issue #798
new
Perhaps the man page/documentation does not mention how to enable it, but it seems that the URL check does omit/ignore the http response header, which sometimes is crucial for health checking.
In my case, I want to make sure that domains redirect to a correct counterpart, like for example:
CHECK HOST ebay.com WITH ADDRESS ebay.com
IF FAILED
port 443 protocol https
with ssl options {verify: enable}
certificate valid > 15 days
content == "Location: https://www.ebay.com"
THEN alert
Comments (4)
-
repo owner -
I just had a usecase for this, so definitely would be nice to have.
-
The location header is associated with the HTTP status 301 (usually) so you can check
status = 301
. Otherwise headers are arguably not content, but I can see how that might be useful. -
In my case I was in need to check if correct cache headers are returned. But yeah, it’s a good workaround for redirects.
- Log in to comment