From: Tollef Fog Heen Date: Sat, 30 Sep 2017 19:50:27 +0000 (+0200) Subject: Disallow redirects for health checking X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=d4594ee26a48582aa5df51463fb9ffd6a805a5c2;p=mirror%2Fdsa-puppet.git Disallow redirects for health checking --- diff --git a/modules/roles/files/mirror_health/mirror-health b/modules/roles/files/mirror_health/mirror-health index fb8241ba0..0e10fa71d 100755 --- a/modules/roles/files/mirror_health/mirror-health +++ b/modules/roles/files/mirror_health/mirror-health @@ -21,7 +21,7 @@ def retrieve_from_host(host, url): 'http': 'http://{}:80'.format(host), 'https': 'http://{}:443'.format(host), } - return requests.get(url, timeout=5, proxies=proxies) + return requests.get(url, timeout=5, proxies=proxies, allow_redirects=False) def last_modified(response): lm = 0