2024-01-18 12:00:36 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang='en'>
|
|
|
|
<head>
|
|
|
|
<title>Quick Fix - Blog - Johannes Olzem</title>
|
|
|
|
<meta name='description' content="Johannes Olzem's Webspace.">
|
|
|
|
<meta charset='utf-8'>
|
|
|
|
<link rel='stylesheet' href='/css/style.css'>
|
|
|
|
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
|
|
|
<link rel='icon' href='/favico.ico'>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
2024-05-15 12:08:00 +02:00
|
|
|
<a href='/' class='home-ref'>
|
|
|
|
<img src='/assets/logo.png' alt='Johannes Olzem'>
|
|
|
|
<span>Johannes Olzem</span>
|
|
|
|
</a>
|
|
|
|
<nav>
|
|
|
|
<a href='/blog/'>Blog</a>
|
|
|
|
<a href='/about/'>About Me</a>
|
|
|
|
<a href='/contact/'>Contact</a>
|
|
|
|
</nav>
|
2024-01-18 12:00:36 +01:00
|
|
|
</header>
|
2024-05-15 12:08:00 +02:00
|
|
|
<main class='full'>
|
2024-01-18 12:00:36 +01:00
|
|
|
<h1>HomeAssistant not connecting over reverse proxy</h1>
|
|
|
|
<br>
|
|
|
|
<p>
|
2024-11-10 17:43:19 +01:00
|
|
|
Make sure you have enabled <em>Websockets Supports</em> or similar functionality in your reverse proxy client.<br><br>
|
|
|
|
If you are getting a <em>400 Bad Request</em> error, find the HomeAssistant log file and look for the following error message:<br>
|
|
|
|
<code>A request from a reverse proxy was received from 12.34.56.78, but your HTTP integration is not set-up for reverse proxies</code><br><br>
|
|
|
|
In your <code>configuration.yaml</code> file, add the following lines:<br>
|
|
|
|
<pre style="text-align:left;">
|
|
|
|
http:<br>
|
|
|
|
use_x_forwarded_for: true<br>
|
|
|
|
trusted_proxies:<br>
|
|
|
|
- 12.34.56.78 # The IP address from the error message
|
|
|
|
</pre>
|
2024-01-18 12:00:36 +01:00
|
|
|
</p>
|
|
|
|
<h2>Explanation</h2>
|
|
|
|
<p>
|
2024-11-10 17:43:19 +01:00
|
|
|
HomeAssistant uses websockets to communicate with the browser.<br><br>
|
|
|
|
If you are using a reverse proxy, the IP address of the incoming connection is not trusted and gets rejected by HomeAssistant.<br>
|
2024-01-18 12:00:36 +01:00
|
|
|
</p>
|
|
|
|
</main>
|
|
|
|
<footer>
|
|
|
|
<h6><a href><script>document.write(window.location.href);</script></a></h6>
|
|
|
|
</footer>
|
|
|
|
</body>
|
|
|
|
</html>
|