switch from nginx to caddy
This commit is contained in:
26
caddy/sites/ha.caddy
Normal file
26
caddy/sites/ha.caddy
Normal file
@@ -0,0 +1,26 @@
|
||||
ha.{$SUBDOMAIN}.{$DOMAIN} {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user