Improve X-Forwarded-* request headers handling (#38696)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
This commit is contained in:
authored and GitHub committed 2020-08-11 22:57:50 +02:00
1 parent 4fa346278c
commit cc4ebc925c
19 files changed
+703 -195

No files matched your search

+1 -2
View File
@@ -6,7 +6,6 @@ from aiohttp.web import Request, Response
import voluptuous as vol
from homeassistant.components import websocket_api
from homeassistant.components.http.const import KEY_REAL_IP
from homeassistant.components.http.view import HomeAssistantView
from homeassistant.const import HTTP_OK
from homeassistant.core import callback
@@ -80,7 +79,7 @@ async def async_handle_webhook(hass, webhook_id, request):
if isinstance(request, MockRequest):
received_from = request.mock_source
else:
received_from = request[KEY_REAL_IP]
received_from = request.remote
_LOGGER.warning(
"Received message for unregistered webhook %s from %s",