authelia.nginx: add auth proxy headers to shared info

This commit is contained in:
eyjhb 2025-01-02 17:18:31 +01:00
parent 9fd8d7b900
commit 5c65f7f922
Signed by: eyjhb
GPG key ID: 609F508E3239F920
4 changed files with 29 additions and 13 deletions

View file

@ -8,6 +8,7 @@ import argparse
import logging
import json
import sys
import os
logging.basicConfig()
logger = logging.getLogger(__name__)
@ -94,10 +95,10 @@ def extract_secrets() -> dict[str, str]:
def index():
# extract user information
user_info = {
"username": request.headers.get("Remote-User"),
"name": request.headers.get("Remote-Name"),
"groups": request.headers.get("Remote-Groups"),
"email": request.headers.get("Remote-Email"),
"username": request.headers.get(os.environ.get("AUTH_PROXY_USERNAME")),
"name": request.headers.get(os.environ.get("AUTH_PROXY_NAME")),
"groups": request.headers.get(os.environ.get("AUTH_PROXY_GROUPS")),
"email": request.headers.get(os.environ.get("AUTH_PROXY_EMAIL")),
}
tmpl_firstpass = render_template_string(
tmpl_index,