Disallow redirects for health checking
authorTollef Fog Heen <tfheen@err.no>
Sat, 30 Sep 2017 19:50:27 +0000 (21:50 +0200)
committerTollef Fog Heen <tfheen@err.no>
Sat, 30 Sep 2017 19:50:27 +0000 (21:50 +0200)
modules/roles/files/mirror_health/mirror-health

index fb8241b..0e10fa7 100755 (executable)
@@ -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