From 932b64b99f3c1b2000359b21a4269a0b273ac668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20K=C3=B6lker?= Date: Wed, 3 Apr 2019 14:35:59 +0000 Subject: [PATCH] utils: send auth to any host redirected to Curl will not send the auth credentials to a host that it has been redirected to by default. Set `pycurl.UNRESTRICTED_AUTH` which is the option for `--location-trusted` to allow sending the name + password to all hosts that the site may redirect to. Fixes: #632 --- utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utils.py b/utils.py index 0d0301e2..e75c75f3 100644 --- a/utils.py +++ b/utils.py @@ -162,6 +162,7 @@ def __init__(self, url, auth, verify): # when they're coming from a non-leader. So we follow redirects. self.curl.setopt(pycurl.FOLLOWLOCATION, True) self.curl.setopt(pycurl.MAXREDIRS, 1) + self.curl.setopt(pycurl.UNRESTRICTED_AUTH, True) # The below settings are to prevent the connection from hanging if the # connection breaks silently. Since marathon-lb only listens, silent