Update security.py (#365)

This commit is contained in:
Pascal Vizeli 2018-02-17 16:09:10 +01:00 committed by GitHub
parent 587047f9d6
commit ac60de0360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,8 @@ _LOGGER = logging.getLogger(__name__)
NO_SECURITY_CHECK = set((
re.compile(r"^/homeassistant/api/.*$"),
re.compile(r"^/homeassistant/websocket$")
re.compile(r"^/homeassistant/websocket$"),
re.compile(r"^/supervisor/ping$"),
))
@ -29,7 +30,7 @@ async def security_layer(request, handler):
# Need to be removed later
if not hassio_token:
_LOGGER.warning("No valid Hass.io token for API access!")
_LOGGER.warning("Invalid token for access %s", request.path)
request[REQUEST_FROM] = 'UNKNOWN'
return await handler(request)