diff --git a/nonebot_plugin_prometheus/api.py b/nonebot_plugin_prometheus/api.py index dc17f36..7b7073a 100644 --- a/nonebot_plugin_prometheus/api.py +++ b/nonebot_plugin_prometheus/api.py @@ -9,7 +9,9 @@ async def metrics(request: Request) -> Response: counter.inc() - return Response(200, content=generate_latest()) + return Response( + 200, headers={"Content-Type": "text/plain"}, content=generate_latest() + ) def enable_prometheus(): diff --git a/pyproject.toml b/pyproject.toml index 1bfc6b1..8fad548 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nonebot-plugin-prometheus" -version = "0.3.3" +version = "0.3.4" description = "为 NoneBot 和其他插件提供 Prometheus 监控支持" readme = "README.md" requires-python = ">=3.9, <4.0"