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:
Colin O'Dell authored and Paulus Schoutsen committed 2018-06-28 09:16:11 -04:00
1 parent dbb786c548
commit 19f2bbf52f
4 files changed
+31 -10

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@ def app():
"""Fixture to setup a web.Application."""
app = web.Application()
app.router.add_get('/', mock_handler)
setup_real_ip(app, False)
setup_real_ip(app, False, [])
return app