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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user