Add trusted networks deprecating warning (#22487)

* Add trusted networks deprecating warning

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Tweak
This commit is contained in:
Jason Hu 2019-04-01 17:43:29 -07:00 committed by Paulus Schoutsen
parent fbb28c401e
commit 5cb69cf163

View File

@ -190,6 +190,12 @@ def setup_auth(hass, app):
elif (trusted_networks and
await async_validate_trusted_networks(request)):
_LOGGER.warning(
'Access from trusted networks without auth token is going to '
'be removed in Home Assistant 0.96. Configure the trusted '
'networks auth provider or use long-lived access tokens to '
'access %s from %s',
request.path, request[KEY_REAL_IP])
authenticated = True
elif (support_legacy and HTTP_HEADER_HA_AUTH in request.headers and