mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-04 06:33:45 +00:00
ensure role is comma separated and stripped correctly
This commit is contained in:
parent
e3d0552447
commit
644e36fb12
@ -268,7 +268,9 @@ def auth(request: Request):
|
||||
|
||||
# if comma-separated with "admin", use "admin", else use default role
|
||||
success_response.headers["remote-role"] = (
|
||||
"admin" if role and "admin" in role else proxy_config.default_role
|
||||
"admin"
|
||||
if role and "admin" in [r.strip() for r in role.split(",")]
|
||||
else proxy_config.default_role
|
||||
)
|
||||
|
||||
return success_response
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user