1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 12:29:08 +00:00
This commit is contained in:
Pascal Vizeli
2018-04-21 22:33:06 +02:00
parent 55c2127baa
commit 28f295a1e2
38 changed files with 386 additions and 337 deletions

View File

@@ -42,13 +42,13 @@ class SecurityMiddleware(CoreSysAttributes):
return await handler(request)
# Home-Assistant
if hassio_token == self._homeassistant.uuid:
if hassio_token == self.sys_homeassistant.uuid:
_LOGGER.debug("%s access from Home-Assistant", request.path)
request[REQUEST_FROM] = 'homeassistant'
return await handler(request)
# Add-on
addon = self._addons.from_uuid(hassio_token)
addon = self.sys_addons.from_uuid(hassio_token)
if addon:
_LOGGER.info("%s access from %s", request.path, addon.slug)
request[REQUEST_FROM] = addon.slug