From 9d46a3d04853e517fa9525df0960ada514dfd2a8 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Wed, 26 Nov 2025 14:21:36 -0600 Subject: [PATCH] make metrics endpoint require auth --- frigate/api/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/api/app.py b/frigate/api/app.py index cded3428b..c87e929a6 100644 --- a/frigate/api/app.py +++ b/frigate/api/app.py @@ -90,7 +90,7 @@ def stats_history(request: Request, keys: str = None): return JSONResponse(content=request.app.stats_emitter.get_stats_history(keys)) -@router.get("/metrics", dependencies=[Depends(allow_public())]) +@router.get("/metrics", dependencies=[Depends(allow_any_authenticated())]) def metrics(request: Request): """Expose Prometheus metrics endpoint and update metrics with latest stats""" # Retrieve the latest statistics and update the Prometheus metrics