From 7e96257c93b55b00a99cb241363a138cec71d0d0 Mon Sep 17 00:00:00 2001 From: jolzem Date: Sun, 10 Nov 2024 17:43:19 +0100 Subject: [PATCH] Added 400 Bad Request error to HomeAssistant quick fix --- blog/quick-fixes/homeassistant-proxy/index.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/blog/quick-fixes/homeassistant-proxy/index.html b/blog/quick-fixes/homeassistant-proxy/index.html index c2856e5..ac9c539 100755 --- a/blog/quick-fixes/homeassistant-proxy/index.html +++ b/blog/quick-fixes/homeassistant-proxy/index.html @@ -24,11 +24,21 @@

HomeAssistant not connecting over reverse proxy


- Make sure you have enabled Websockets Supports or similar functionality in your reverse proxy client. + Make sure you have enabled Websockets Supports or similar functionality in your reverse proxy client.

+ If you are getting a 400 Bad Request error, find the HomeAssistant log file and look for the following error message:
+ A request from a reverse proxy was received from 12.34.56.78, but your HTTP integration is not set-up for reverse proxies

+ In your configuration.yaml file, add the following lines:
+

+http:
+ use_x_forwarded_for: true
+ trusted_proxies:
+ - 12.34.56.78 # The IP address from the error message +

Explanation

- HomeAssistant uses websockets to communicate with the browser. + HomeAssistant uses websockets to communicate with the browser.

+ If you are using a reverse proxy, the IP address of the incoming connection is not trusted and gets rejected by HomeAssistant.