Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions homeassistant/components/http/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ async def auth_middleware(request, handler):
if use_auth and (HTTP_HEADER_HA_AUTH in request.headers or
DATA_API_PASSWORD in request.query):
if request.path not in old_auth_warning:
_LOGGER.warning('Please change to use bearer token access %s',
request.path)
_LOGGER.log(
logging.INFO if support_legacy else logging.WARNING,
'Please change to use bearer token access %s from %s',
request.path, request[KEY_REAL_IP])
old_auth_warning.add(request.path)

legacy_auth = (not use_auth or support_legacy) and api_password
Expand Down