Use proper signals (#18613)
* Emulated Hue not use deprecated handler * Remove no longer needed workaround * Add middleware directly * Dont always load the ban config file * Update homeassistant/components/http/ban.py Co-Authored-By: balloob <paulus@home-assistant.io> * Update __init__.py
This commit is contained in:
parent
5b3e9399a9
commit
1341ecd2eb
7 changed files with 43 additions and 45 deletions
|
@ -96,11 +96,7 @@ def setup_auth(app, trusted_networks, use_auth,
|
|||
request[KEY_AUTHENTICATED] = authenticated
|
||||
return await handler(request)
|
||||
|
||||
async def auth_startup(app):
|
||||
"""Initialize auth middleware when app starts up."""
|
||||
app.middlewares.append(auth_middleware)
|
||||
|
||||
app.on_startup.append(auth_startup)
|
||||
app.middlewares.append(auth_middleware)
|
||||
|
||||
|
||||
def _is_trusted_ip(request, trusted_networks):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue