Skip to content

Commit 6662d15

Browse files
fanaticDavidfabaff
authored andcommitted
Update HTTP component page (home-assistant#1567)
clarify what values are accepted for the configuration variable use_x_forwarded_for
1 parent 0bca33a commit 6662d15

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/_components/http.markdown

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Configuration variables:
3232
- **ssl_certificate** (*Optional*): Path to your TLS/SSL certificate to serve Home Assistant over a secure connection.
3333
- **ssl_key** (*Optional*): Path to your TLS/SSL key to serve Home Assistant over a secure connection.
3434
- **cors_allowed_origins** (*Optional*): A list of origin domain names to allow [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) requests from. Enabling this will set the `Access-Control-Allow-Origin` header to the Origin header if it is found in the list, and the `Access-Control-Allow-Headers` header to `Origin, Accept, X-Requested-With, Content-type, X-HA-access`. You must provide the exact Origin, i.e. `https://home-assistant.io` will allow requests from `https://home-assistant.io` but __not__ `http://home-assistant.io`.
35-
- **use_x_forwarded_for** (*Optional*): Enable parsing of the `X-Forwarded-For` header, passing on the client's correct IP address in proxied setups. You should only enable this in a trustworthy network environment, as clients passing that header could easily spoof their source IP address.
35+
- **use_x_forwarded_for** (*Optional*): Enable parsing of the `X-Forwarded-For` header, passing on the client's correct IP address in proxied setups. You should only enable this in a trustworthy network environment, as clients passing that header could easily spoof their source IP address. Defaults to False.
3636
- **trusted_networks** (*Optional*): List of trusted networks, consisting of IP addresses or networks, that are allowed to bypass password protection when accessing Home Assistant.
3737
- **ip_ban_enabled** (*Optional*): Flag indicating whether additional IP filtering is enabled. Defaults to False.
3838
- **login_attempts_threshold** (*Optional*): Number of failed login attemt from single IP after which it will be automatically banned if `ip_ban_enabled` is True. Defaults to -1, meaning that no new automatic bans will be added.
@@ -49,6 +49,7 @@ http:
4949
cors_allowed_origins:
5050
- https://google.com
5151
- https://home-assistant.io
52+
use_x_forwarded_for: True
5253
trusted_networks:
5354
- 127.0.0.1
5455
- ::1
@@ -81,4 +82,4 @@ After a ban is added a Persistent Notification is populated to the Home Assistan
8182

8283
<p class='note warning'>
8384
Please note, that sources from `trusted_networks` won't be banned automatically.
84-
</p>
85+
</p>

0 commit comments

Comments
 (0)