diff options
| -rw-r--r-- | src/metrics.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/metrics.c b/src/metrics.c index d3eaf52..fb81b77 100644 --- a/src/metrics.c +++ b/src/metrics.c @@ -54,6 +54,7 @@ enum MHD_Result promhttp_handler( if (strcmp(url, "/metrics") == 0) { const char *buf = prom_collector_registry_bridge(PROM_COLLECTOR_REGISTRY_DEFAULT); struct MHD_Response *response = MHD_create_response_from_buffer(strlen(buf), (void *)buf, MHD_RESPMEM_MUST_FREE); + if(MHD_add_response_header(response, "Content-Type", "text/plain; version=0.0.4") == MHD_NO) abort(); int ret = MHD_queue_response(connection, MHD_HTTP_OK, response); MHD_destroy_response(response); return ret; |
