Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the simply-static domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/wp-includes/functions.php on line 6121
cloudflare 使用home assistant 出现400:Bad Request错误的处理

cloudflare 使用home assistant 出现400:Bad Request错误的处理

在configuraiton.yaml添加

http:
   # Cloudflare setting to unlock reverse proxy
   use_x_forwarded_for: true
   trusted_proxies:
     - 192.168.0.109

https://community.home-assistant.io/t/issue-with-nginx-reverse-proxy-setup-external-access/321776/8

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
  ip_ban_enabled: true
  login_attempts_threshold: 5
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.30.33.0/24
取而代之的是:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
 http:
  ip_ban_enabled: true
  login_attempts_threshold: 5
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.30.33.0/24

实践解决如下:

nano /usr/share/hassio/homeassistant/configuration.yaml

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
 http:
  ip_ban_enabled: true
  use_x_forwarded_for: true
  trusted_proxies:
    - 192.168.0.0/24
    - 127.0.0.1
    - 172.16.0.0/12
    - 172.30.33.0/24
    - 172.30.32.0/23