From d4594ee26a48582aa5df51463fb9ffd6a805a5c2 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Sat, 30 Sep 2017 21:50:27 +0200 Subject: [PATCH] Disallow redirects for health checking --- modules/roles/files/mirror_health/mirror-health | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.20.1