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.

fix: Prevent caching of Docker agent install script and binaries

rcourtmana1ba3c00c174
diff --git a/internal/api/router.go b/internal/api/router.go
index 6ad80c3f00..d46273407e 100644
--- a/internal/api/router.go
+++ b/internal/api/router.go
@@ -2566,6 +2566,11 @@ func (r *Router) handleDownloadInstallScript(w http.ResponseWriter, req *http.Re
return
}
+ // Prevent caching - always serve the latest version
+ w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
+ w.Header().Set("Pragma", "no-cache")
+ w.Header().Set("Expires", "0")
+
scriptPath := "/opt/pulse/scripts/install-docker-agent.sh"
http.ServeFile(w, req, scriptPath)
}
@@ -2577,6 +2582,11 @@ func (r *Router) handleDownloadAgent(w http.ResponseWriter, req *http.Request) {
return
}
+ // Prevent caching - always serve the latest version
+ w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
+ w.Header().Set("Pragma", "no-cache")
+ w.Header().Set("Expires", "0")
+
archParam := strings.TrimSpace(req.URL.Query().Get("arch"))
searchPaths := make([]string, 0, 4)