mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
app/vmselect/prometheus: fix content-type for /api/v1/export
responses
The correct Content-Type should be `application/stream+json` instead of `application/json` Thanks to Joshua Ryder for pointing to this.
This commit is contained in:
parent
28cc4c09b5
commit
e0ac068112
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ var exportDuration = metrics.NewSummary(`vm_request_duration_seconds{path="/api/
|
||||||
func exportHandler(at *auth.Token, w http.ResponseWriter, matches []string, start, end int64, format string, deadline netstorage.Deadline) error {
|
func exportHandler(at *auth.Token, w http.ResponseWriter, matches []string, start, end int64, format string, deadline netstorage.Deadline) error {
|
||||||
writeResponseFunc := WriteExportStdResponse
|
writeResponseFunc := WriteExportStdResponse
|
||||||
writeLineFunc := WriteExportJSONLine
|
writeLineFunc := WriteExportJSONLine
|
||||||
contentType := "application/json"
|
contentType := "application/stream+json"
|
||||||
if format == "prometheus" {
|
if format == "prometheus" {
|
||||||
contentType = "text/plain"
|
contentType = "text/plain"
|
||||||
writeLineFunc = WriteExportPrometheusLine
|
writeLineFunc = WriteExportPrometheusLine
|
||||||
|
|
Loading…
Reference in a new issue