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.

Serve shipped markdown docs as text instead of a forced download

rcourtman07fb7dbbacf2
diff --git a/internal/api/frontend_embed.go b/internal/api/frontend_embed.go
index 84efd3f6b6..c70650ecce 100644
--- a/internal/api/frontend_embed.go
+++ b/internal/api/frontend_embed.go
@@ -262,6 +262,11 @@ func serveFrontendHandler() http.HandlerFunc {
contentType = "application/json"
} else if strings.HasSuffix(lookupPath, ".svg") {
contentType = "image/svg+xml"
+ } else if strings.HasSuffix(lookupPath, ".md") {
+ // Shipped docs (/docs/*.md) open in a browser tab from
+ // in-app links; text/plain renders them readable instead
+ // of forcing a download.
+ contentType = "text/plain; charset=utf-8"
}
w.Header().Set("Content-Type", contentType)