authelia.nginx: add auth proxy headers to shared info
This commit is contained in:
parent
9fd8d7b900
commit
5c65f7f922
4 changed files with 29 additions and 13 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue