Caddy: /whoami on the main host echoes the Authentik identity headers for debugging
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -240,6 +240,15 @@ def write_caddy(domain, auth_host="", watch_host="", git_host="", bot_host="", l
|
||||
{domain} {{
|
||||
encode zstd gzip
|
||||
{AUTHENTIK_FORWARD_AUTH}
|
||||
# who does Authentik say I am? (debug: shows exactly the identity headers the apps receive)
|
||||
handle /whoami {{
|
||||
header Content-Type text/plain
|
||||
respond "user: {{http.request.header.X-Authentik-Username}}
|
||||
groups: {{http.request.header.X-Authentik-Groups}}
|
||||
email: {{http.request.header.X-Authentik-Email}}
|
||||
name: {{http.request.header.X-Authentik-Name}}"
|
||||
}}
|
||||
|
||||
# dump endpoint (python service on the host; identity from the X-Authentik-* headers Caddy just set)
|
||||
handle /dump* {{
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
|
||||
Reference in New Issue
Block a user