Skip to content

Commit edb4061

Browse files
Fix authentication header handling - omit x-forwarded-email when missing instead of empty string
1 parent ddedc7b commit edb4061

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

backend/app/api/v1/validate.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,11 @@ async def validate_with_headers(request: Request) -> User:
120120
path="/",
121121
headers={
122122
"x-forwarded-user": request.headers.get("X-Forwarded-User"),
123-
"x-forwarded-email": request.headers.get("X-Forwarded-Email") or "",
123+
**(
124+
{"x-forwarded-email": request.headers.get("X-Forwarded-Email")}
125+
if request.headers.get("X-Forwarded-Email")
126+
else {}
127+
),
124128
},
125129
params={},
126130
),

0 commit comments

Comments
 (0)