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:
1 parent
5b3e9399a9
commit
1341ecd2eb
7 files changed
+43
-45
No files matched your search
@@ -33,8 +33,4 @@ def setup_real_ip(app, use_x_forwarded_for, trusted_proxies):
|
||||
|
||||
return await handler(request)
|
||||
|
||||
async def app_startup(app):
|
||||
"""Initialize bans when app starts up."""
|
||||
app.middlewares.append(real_ip_middleware)
|
||||
|
||||
app.on_startup.append(app_startup)
|
||||
app.middlewares.append(real_ip_middleware)
|
||||
Reference in new issue
Block a user