fix(sdk/client): reserve the host protocal (http or https) so that http host can work. Fixes #4277 (#4285)
This commit is contained in:
parent
c7300c343c
commit
cc78bd1a4f
|
|
@ -147,11 +147,8 @@ class Client(object):
|
|||
|
||||
host = host or ''
|
||||
# Preprocess the host endpoint to prevent some common user mistakes.
|
||||
# This should only be done for non-IAP cases (when client_id is None). IAP requires preserving the protocol.
|
||||
if not client_id:
|
||||
# Per feedback in proxy env, http or https is still required
|
||||
if not proxy:
|
||||
host = re.sub(r'^(http|https)://', '', host)
|
||||
# always preserving the protocol (http://localhost requires it)
|
||||
host = host.rstrip('/')
|
||||
|
||||
if host:
|
||||
|
|
|
|||
Loading…
Reference in New Issue