traefik/templates/configs/homeassistant.yml.j2

26 lines
700 B
Django/Jinja

http:
routers:
homeassistant:
service: homeassistant
rule: Host(`home.{{ traefik.main_domain }}`)
priority: 10
entryPoints:
- https
- http
tls:
certResolver: hetzner
middlewares:
- homeassistant-headers
services:
homeassistant:
loadbalancer:
servers:
- url: "http://{{ traefik.include_external_services.homeassistant.url }}:8123"
passHostHeader: true
middlewares:
homeassistant-headers:
headers:
customResponseHeaders:
X-Frame-Options: "ALLOW-FROM *.{{ traefik.main_domain }}"
Content-Security-Policy: "frame-ancestors *.{{ traefik.main_domain }}"