Skip to content

[Home Assistant] Add support for trusted_proxies (required for reverse proxy) #1010

Description

@alexthamm

Home Assistant requires the configuration of "trusted_proxies" or it denies any requests for the hass UI.

This is logged in the container logs when you access the UI without further adjustments:

2021-09-19 18:51:55.943951+00:00�[31m2021-09-19 20:51:55 ERROR (MainThread) [homeassistant.components.http.forwarded] A request from a reverse proxy was received from 172.16.0.52, but your HTTP integration is not set-up for reverse proxies�[0m

I could convince hass to serve the UI from my domain by adding the following config to the configuration.yml:

http:
  base_url: https://hass.my-domain.com
  use_x_forwarded_for: true
  trusted_proxies:
    - 127.0.0.1
    - 172.16.0.52

However, IPs in the cluster are dynamic. The proxy should be configured automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions