From 2ef12b2ffa6dd11041e7120febcbd62338ec8cd3 Mon Sep 17 00:00:00 2001 From: Nitzan Mordechai Date: Thu, 11 Dec 2025 06:32:31 +0000 Subject: [PATCH] mgr/prometheus: metrics header for standby module PR #65245 drop the header set for standby module, we should still have it. Fixes: https://tracker.ceph.com/issues/74149 Signed-off-by: Nitzan Mordechai --- src/pybind/mgr/prometheus/module.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index f5c8f778521e..0d825c427300 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -2121,6 +2121,7 @@ class Module(MgrModule, OrchestratorClientMixin): # Lock the function execution assert isinstance(_global_instance, Module) with _global_instance.collect_lock: + cherrypy.response.headers['Content-Type'] = 'text/plain; charset=utf-8' return self._metrics(_global_instance) @staticmethod @@ -2330,6 +2331,7 @@ class StandbyModule(MgrStandbyModule): @cherrypy.expose def metrics(self) -> str: + cherrypy.response.headers['Content-Type'] = 'text/plain; charset=utf-8' return '' cherrypy.tree.mount(Root(), '/', {}) -- 2.47.3