Enable Authelia template config filter
configuration.yml uses Go-template substitution like
`{{ env "DOMAIN" }}` for the cookie domain, authelia_url, etc.
That substitution doesn't run by default; Authelia reads the
braces literally, fails URL parsing with `invalid character "{"
in host name`, and `domain` validation rejects the hostname for
having no period.
Setting X_AUTHELIA_CONFIG_FILTERS=template enables Authelia's
Go-template filter so the substitution runs at config load.
The env var is inherited by `docker compose run --rm authelia`,
so validate-config picks it up too.
https://claude.ai/code/session_013XZ1vmgk78k2PEQ5DmJhF3
This commit is contained in:
+8
-2
@@ -34,8 +34,14 @@ services:
|
||||
- AUTHELIA_SESSION_SECRET_FILE=/secrets/SESSION_SECRET
|
||||
- AUTHELIA_STORAGE_ENCRYPTION_KEY_FILE=/secrets/STORAGE_ENCRYPTION_KEY
|
||||
- TZ=${TZ:-UTC}
|
||||
# Passed through so authelia/configuration.yml can use {{ env "DOMAIN" }}
|
||||
# instead of hardcoding your domain in the config file.
|
||||
# Enables Go-template substitution in configuration.yml so
|
||||
# `{{ env "DOMAIN" }}` actually expands instead of being read as a
|
||||
# literal string. Without this, Authelia parses the braces as part
|
||||
# of the hostname and validate-config fails with `invalid character
|
||||
# "{" in host name`. Inherited by `docker compose run --rm authelia`,
|
||||
# so validate-config picks it up too.
|
||||
- X_AUTHELIA_CONFIG_FILTERS=template
|
||||
# Passed through so authelia/configuration.yml can use {{ env "DOMAIN" }}.
|
||||
- DOMAIN=${DOMAIN}
|
||||
volumes:
|
||||
- ./authelia:/config
|
||||
|
||||
Reference in New Issue
Block a user