Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Read the response media parser's parameter result

pulse-triage[bot]fd1bf52833c4
diff --git a/internal/api/token_response_authority.go b/internal/api/token_response_authority.go
index 9998a48c8b..e0d956520c 100644
--- a/internal/api/token_response_authority.go
+++ b/internal/api/token_response_authority.go
@@ -88,7 +88,7 @@ func (w *tokenResponseWriter) commitLocked(status int) {
// handler's private header map. Missing, malformed or unexpected
// types must not allow HTTP sniffing or an extension to render HTML.
// Leave payload bytes alone: HTML-escaping JSON would corrupt data.
- mediaType, err := mime.ParseMediaType(w.header.Get("Content-Type"))
+ mediaType, _, err := mime.ParseMediaType(w.header.Get("Content-Type"))
if err == nil && mediaType == "application/json" {
header.Set("Content-Type", "application/json")
} else {