mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-13 06:35:24 +03:00
Handle case where native auth is not enabled
This commit is contained in:
parent
d0e46b3ce8
commit
7e55af7d87
@ -39,7 +39,11 @@ def get_vapid_pub_key():
|
||||
|
||||
@NotificationBp.route("/notifications/register", methods=["POST"])
|
||||
def register_notifications():
|
||||
if current_app.frigate_config.auth.enabled:
|
||||
username = request.headers.get("remote-user", type=str) or "admin"
|
||||
else:
|
||||
username = "admin"
|
||||
|
||||
json: dict[str, any] = request.get_json(silent=True) or {}
|
||||
sub = json.get("sub")
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user