Add Content-Type header to prometheus response (#1662)

Prometheus v3 requires `Content-Type` header
Fixes #1658
This commit is contained in:
Pavel Punsky 2025-03-30 12:58:41 -07:00 committed by GitHub
parent 831b7245aa
commit 791e4c9f7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,6 +65,7 @@ MHD_RESULT promhttp_handler(void *cls, struct MHD_Connection *connection, const
}
ret = MHD_NO;
} else {
MHD_add_response_header(response, "Content-Type", "text/plain");
ret = MHD_queue_response(connection, status, response);
MHD_destroy_response(response);
}