diff --git a/internal/api/router.go b/internal/api/router.go index 6ad80c3..d462734 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)