1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 04:19:03 +00:00

Bugfix SSL settings on proxy (#288)

* Bugfix SSL settings on proxy

* fix lint
This commit is contained in:
Pascal Vizeli
2017-12-26 12:10:24 +01:00
committed by GitHub
parent d105552fa9
commit 1bdd3d88de
3 changed files with 8 additions and 6 deletions

View File

@@ -16,11 +16,13 @@ _LOGGER = logging.getLogger(__name__)
class APIProxy(object):
"""API Proxy for Home-Assistant."""
def __init__(self, loop, homeassistant, websession):
def __init__(self, loop, homeassistant):
"""Initialize api proxy."""
self.loop = loop
self.homeassistant = homeassistant
self.websession = websession
# Use homeassistant websession to ignore SSL
self.websession = homeassistant.websession
async def _api_client(self, request, path, timeout=300):
"""Return a client request with proxy origin for Home-Assistant."""
@@ -109,7 +111,7 @@ class APIProxy(object):
try:
client = await self.websession.ws_connect(
url, heartbeat=60)
url, heartbeat=60, verify_ssl=False)
# handle authentication
for _ in range(2):