diff --git a/mpcontribs-client/mpcontribs/client/__init__.py b/mpcontribs-client/mpcontribs/client/__init__.py index 8bf20fc0f..e095bf82c 100644 --- a/mpcontribs-client/mpcontribs/client/__init__.py +++ b/mpcontribs-client/mpcontribs/client/__init__.py @@ -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 (