mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 21:44:13 +03:00
make metrics endpoint require auth
This commit is contained in:
parent
aa46d4112e
commit
9d46a3d048
@ -90,7 +90,7 @@ def stats_history(request: Request, keys: str = None):
|
|||||||
return JSONResponse(content=request.app.stats_emitter.get_stats_history(keys))
|
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):
|
def metrics(request: Request):
|
||||||
"""Expose Prometheus metrics endpoint and update metrics with latest stats"""
|
"""Expose Prometheus metrics endpoint and update metrics with latest stats"""
|
||||||
# Retrieve the latest statistics and update the Prometheus metrics
|
# Retrieve the latest statistics and update the Prometheus metrics
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user