Excempt /metrics from limits

This commit is contained in:
Piero Toffanin 2022-12-26 20:00:55 -05:00
parent 9d2a2cd55f
commit 40a1141eac

View file

@ -182,6 +182,7 @@ def create_app(args):
from prometheus_client import CONTENT_TYPE_LATEST, Summary, Gauge, CollectorRegistry, multiprocess, generate_latest from prometheus_client import CONTENT_TYPE_LATEST, Summary, Gauge, CollectorRegistry, multiprocess, generate_latest
@app.route("/metrics") @app.route("/metrics")
@limiter.exempt
def prometheus_metrics(): def prometheus_metrics():
if args.metrics_auth_token: if args.metrics_auth_token:
authorization = request.headers.get('Authorization') authorization = request.headers.get('Authorization')