Skip to content

Commit

Permalink
Skip host name preprocess for the IAP case (kubeflow#3427)
Browse files Browse the repository at this point in the history
  • Loading branch information
chensun committed Apr 3, 2020
1 parent 25ff7be commit 9b5fcdb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdk/python/kfp/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ def _load_config(self, host, client_id, namespace, other_client_id, other_client

host = host or ''
# Preprocess the host endpoint to prevent some common user mistakes.
host = re.sub(r'^(http|https)://', '', host).rstrip('/')
# This should only be done for non-IAP cases (when client_id is None). IAP requires preserving the protocol.
if not client_id:
host = re.sub(r'^(http|https)://', '', host).rstrip('/')

if host:
config.host = host
Expand Down

0 comments on commit 9b5fcdb

Please sign in to comment.