Only use the X-Forwarded-For header if connection is from a trusted network (#15182)
See https://github.com/home-assistant/home-assistant/issues/14345#issuecomment-400854569
This commit is contained in:
1 parent
dbb786c548
commit
19f2bbf52f
4 files changed
+31
-10
No files matched your search
@@ -180,7 +180,7 @@ class HomeAssistantHTTP(object):
|
||||
middlewares=[staticresource_middleware])
|
||||
|
||||
# This order matters
|
||||
setup_real_ip(app, use_x_forwarded_for)
|
||||
setup_real_ip(app, use_x_forwarded_for, trusted_networks)
|
||||
|
||||
if is_ban_enabled:
|
||||
setup_bans(hass, app, login_threshold)
|
||||
|
||||
Reference in new issue
Block a user