Skip to content
Snippets Groups Projects
Commit 2dfe6aad authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Ignore proxies in Nginx tests.

parent cb649ea8
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ if not os.path.exists('/etc/nginx'):
else:
print('Checking http://127.0.0.1:1080/nginx_status response.')
try:
req = requests.get('http://127.0.0.1:1080/nginx_status', timeout=5)
req = requests.get('http://127.0.0.1:1080/nginx_status', proxies={'http': '', 'https': ''}, timeout=5)
if req.status_code != 200:
raise Exception('Request failed with status code %s.' % req.status_code)
if 'Active connections' not in req.text:
......
......@@ -37,7 +37,7 @@ else:
url = '%s://%s' % ('https' if https else 'http', domain)
sys.stdout.write('Testing url "%s": ' % url)
try:
req = requests.get(url, verify=False, timeout=10)
req = requests.get(url, verify=False, proxies={'http': '', 'https': ''}, timeout=10)
except Exception as e:
code = str(e)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment