This commit is contained in:
Paweł Jankowiak 2025-09-05 12:59:29 +01:00 committed by GitHub
commit cd69d31391
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,6 +12,7 @@ import time
from datetime import datetime
from pathlib import Path
from typing import List
from urllib.parse import unquote
from fastapi import APIRouter, Depends, HTTPException, Request, Response
from fastapi.responses import JSONResponse, RedirectResponse
@ -452,7 +453,7 @@ def profile(request: Request):
username = request.headers.get("remote-user", "anonymous")
role = request.headers.get("remote-role", "viewer")
return JSONResponse(content={"username": username, "role": role})
return JSONResponse(content={"username": unquote(username), "role": role})
@router.get("/logout")