Files
homeassistant/docs/nginx.mdx
2025-10-19 21:37:10 +08:00

22 lines
575 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 使用nginx配置有一个域名问题
一直配置域名访问失败,不能访问,加端口才能正常访问
homeassisant的home-assisatant.log的错误信息是
```
ERROR (MainThread) [homeassistant.components.http.forwarded] Received X-Forwarded-For header from an untrusted proxy 192.168.65.1
```
修改的办法, 在`trusted_proxies`添加信任的的ip地址比如`192.168.65.1`
```sh
http:
use_x_forwarded_for: true
trusted_proxies:
- 127.0.0.1
- 192.168.65.1 # ✅ 加上这个 IP
ip_ban_enabled: true
login_attempts_threshold: 5
```