nobearer
All checks were successful
Deploy on push / deploy (push) Successful in 55s

This commit is contained in:
Untone 2024-12-22 00:30:04 +03:00
parent e539e0334f
commit 4ffcbf36d3

View File

@ -22,6 +22,10 @@ async def check_auth(req):
- user_roles: list[str] - Список ролей пользователя.
"""
token = req.headers.get("Authorization")
# Проверяем и очищаем токен от префикса Bearer если он есть
if token.startswith('Bearer '):
token = token.split('Bearer ')[-1].strip()
host = req.headers.get('host', '')
logger.debug(f"check_auth: host={host}")
auth_url = AUTH_URL