check https response header

Issue #798 new
Former user created an issue

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)

  1. hauk

    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.

  2. Val V

    In my case I was in need to check if correct cache headers are returned. But yeah, it’s a good workaround for redirects.

  3. Log in to comment