53 lines
1.9 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
2025-02-09 15:00:01 +01:00
<html lang="en">
<head>
2025-02-09 15:00:01 +01:00
<title>Quick fix - Johannes Olzem</title>
<meta name="description" content="Johannes Olzem's personal website">
<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>
2025-02-09 15:00:01 +01:00
<body class="body">
<header>
2025-02-09 15:00:01 +01:00
<a href="/">
<img src="/img/logo.png">
2024-05-15 12:08:00 +02:00
</a>
2025-02-09 15:00:01 +01:00
<a href="/about/">About</a>
<a href="/blog/">Blog</a>
<a href="/contact/">Contact</a>
</header>
2025-02-09 15:00:01 +01:00
<main>
<h1>Johannes Olzem</h1>
<blockquote>Less is more</blockquote>
<h2>HomeAssistant not connecting over reverse proxy</h2>
<p>
2025-02-09 15:00:01 +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>
2025-02-09 15:00:01 +01:00
<pre>
http:<br>
use_x_forwarded_for: true<br>
trusted_proxies:<br>
- 12.34.56.78 # The IP address from the error message
2025-02-09 15:00:01 +01:00
</pre>
</p>
2025-02-09 15:00:01 +01:00
<h3>Explanation</h3>
<p>
HomeAssistant uses websockets to communicate with the browser.<br><br>
2025-02-09 15:00:01 +01:00
If you are using a reverse proxy, the IP address of the incoming
connection is not trusted and gets rejected by HomeAssistant.<br>
</p>
</main>
<footer>
2025-02-09 15:00:01 +01:00
&copy; 2021 - <script>document.write(new Date().getFullYear())</script> Johannes Olzem
<br>
<small>This website is free software. You can redistribute and modify it under the terms of the GNU General Public License V3.</small>
</footer>
</body>
2025-02-09 15:00:01 +01:00