Skip to content

Commit

Permalink
client: fix protocol criterium
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Feb 18, 2021
1 parent 1ae00e3 commit 1acadf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mpcontribs-client/mpcontribs/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def __init__(self, apikey=None, headers=None, host=None):
self.apikey = apikey
self.headers = {"x-api-key": apikey} if apikey else headers
self.host = host
self.protocol = "http" if ":" in host else "https"
self.protocol = "http" if host.startswith("localhost") else "https"
self.url = f"{self.protocol}://{self.host}"

if "swagger_spec" not in self.__dict__ or (
Expand Down

0 comments on commit 1acadf4

Please sign in to comment.