mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-07 03:11:15 +03:00
Fixes (#18055)
* frigate+ pane i18n fix * catch more exceptions * explore search result tooltip i18n fix * i18n fix * remove comments about deprecated strftime_fmt * Catch producers exists but is None * Formatting * fix live camera view i18n * Add default role config for proxy users This allows users to specify a default role for users when using a proxy for auth. This can be useful for users who can't/don't want to define a header mapping for the remote-role header. * update reference config and auth docs * clarify face rec camera level config * clarify auth docs * Fix onnx not working with openvino * Update openvino to fix failed npu plugin check --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
co-authored by
Nicolas Mowen
parent
976863518b
commit
511542eaf8
+1
-1
@@ -74,7 +74,7 @@ def go2rtc_streams():
|
||||
)
|
||||
stream_data = r.json()
|
||||
for data in stream_data.values():
|
||||
for producer in data.get("producers", []):
|
||||
for producer in data.get("producers") or []:
|
||||
producer["url"] = clean_camera_user_pass(producer.get("url", ""))
|
||||
return JSONResponse(content=stream_data)
|
||||
|
||||
|
||||
+4
-4
@@ -261,14 +261,14 @@ def auth(request: Request):
|
||||
|
||||
role_header = proxy_config.header_map.role
|
||||
role = (
|
||||
request.headers.get(role_header, default="viewer")
|
||||
request.headers.get(role_header, default=proxy_config.default_role)
|
||||
if role_header
|
||||
else "viewer"
|
||||
else proxy_config.default_role
|
||||
)
|
||||
|
||||
# if comma-separated with "admin", use "admin", else "viewer"
|
||||
# if comma-separated with "admin", use "admin", else use default role
|
||||
success_response.headers["remote-role"] = (
|
||||
"admin" if role and "admin" in role else "viewer"
|
||||
"admin" if role and "admin" in role else proxy_config.default_role
|
||||
)
|
||||
|
||||
return success_response
|
||||
|
||||
Reference in New Issue
Block a user