diff --git a/libretranslate/app.py b/libretranslate/app.py index 6333b33..4706abd 100644 --- a/libretranslate/app.py +++ b/libretranslate/app.py @@ -212,6 +212,7 @@ def create_app(args): authorization = request.headers.get('Authorization') if authorization != "Bearer " + args.metrics_auth_token: abort(401, description=_("Unauthorized")) + registry = CollectorRegistry() multiprocess.MultiProcessCollector(registry) return Response(generate_latest(registry), mimetype=CONTENT_TYPE_LATEST)