69 lines
2.1 KiB
HTML
69 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<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>
|
|
<body>
|
|
<nav>
|
|
<a href="/" class="header-logo">
|
|
<img src="/img/header-logo.webp" alt="logo">
|
|
</a>
|
|
<span class="header-text">Johannes Olzem</span>
|
|
<ul>
|
|
<li>
|
|
<a href="/about/">About</a>
|
|
</li>
|
|
<li>
|
|
<a href="/blog/">Blog</a>
|
|
</li>
|
|
<li>
|
|
<a href="/contact/">Contact</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<main>
|
|
<h1>Quick fix</h1>
|
|
<h2>HomeAssistant not connecting over reverse proxy</h2>
|
|
<p>
|
|
Make sure you have enabled <em>Websockets Support</em> or similar
|
|
functionality in your reverse proxy client.
|
|
</p>
|
|
<p>
|
|
If you are getting a <code>400 Bad Request</code> error, find the
|
|
HomeAssistant log file and look for the following error message:
|
|
</p>
|
|
<p class="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
|
|
</p>
|
|
<p>
|
|
In your <code>configuration.yaml</code> file, add the following lines:
|
|
</p>
|
|
<p class="code">
|
|
http:<br>
|
|
 use_x_forwarded_for: true<br>
|
|
 trusted_proxies:<br>
|
|
  - 12.34.56.78 # The IP address from the error message
|
|
</p>
|
|
<h2>Explanation</h2>
|
|
<p>
|
|
HomeAssistant uses websockets to communicate with the browser.
|
|
</p>
|
|
<p>
|
|
If you are using a reverse proxy, the IP address of the incoming
|
|
connection is not trusted and gets rejected by HomeAssistant.
|
|
</p>
|
|
</main>
|
|
<footer>
|
|
© 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>
|
|
|