X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Ffiles%2Fmirror_health%2Fmirror-health;h=bbd4c2787768291ecc37ed7b748c309e3dc18d02;hb=0c067639ec7d7050b69249b85e6aa83ab91820b5;hp=2c582f25a5b8f862a44dda93fcec4e1ca434118c;hpb=7f3bdf0354318e302a7e849e6c722f8759277179;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/files/mirror_health/mirror-health b/modules/roles/files/mirror_health/mirror-health index 2c582f25a..bbd4c2787 100755 --- a/modules/roles/files/mirror_health/mirror-health +++ b/modules/roles/files/mirror_health/mirror-health @@ -21,7 +21,8 @@ def retrieve_from_host(host, url): 'http': 'http://{}:80'.format(host), 'https': 'http://{}:443'.format(host), } - return requests.get(url, timeout=5, proxies=proxies, allow_redirects=False) + headers = {'User-Agent': 'mirror-health'} + return requests.get(url, headers=headers, timeout=5, proxies=proxies, allow_redirects=False) def last_modified(response): lm = 0