split Caddyfile

This commit is contained in:
2024-12-01 14:52:27 +01:00
parent 4f9a87f775
commit 027c5f422f
6 changed files with 150 additions and 155 deletions

27
caddy/sites/ha.caddy Normal file
View File

@@ -0,0 +1,27 @@
ha.rik.veenboer.xyz {
log {
output file /var/log/ha.log
}
route {
@app <<CEL
header({'X-Requested-With': 'io.homeassistant.companion.android'}) ||
header_regexp('User-Agent', '^Home Assistant') ||
header_regexp('User-Agent', 'Android')
CEL
handle @app {
reverse_proxy host:8123
}
handle {
reverse_proxy /outpost.goauthentik.io/* http://host:19000
forward_auth http://host:19000 {
uri /outpost.goauthentik.io/auth/caddy?rd={http.request.uri}
copy_headers {
X-Homeassistant-User
}
}
reverse_proxy host:8123
}
}
}