From 98c7fc75b72921f22537bbdcf23793b0b20c5947 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Fri, 30 Jan 2026 22:26:02 -0800 Subject: [PATCH] Add no-cache headers to static files, fix flow view multi-line names Co-Authored-By: Claude Opus 4.5 --- http.go | 9 ++++++++- static/style.css | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/http.go b/http.go index 771d50e..fb011e0 100644 --- a/http.go +++ b/http.go @@ -33,6 +33,13 @@ type StatusResponse struct { } +func noCacheHandler(h http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Cache-Control", "no-cache") + h.ServeHTTP(w, r) + }) +} + func (t *Tendrils) startHTTPServer() { if err := ensureCert(); err != nil { log.Printf("[ERROR] failed to ensure certificate: %v", err) @@ -43,7 +50,7 @@ func (t *Tendrils) startHTTPServer() { mux.HandleFunc("/api/status", t.handleAPIStatus) mux.HandleFunc("/api/status/stream", t.handleAPIStatusStream) mux.HandleFunc("/api/errors/clear", t.handleClearError) - mux.Handle("/", http.FileServer(http.Dir("static"))) + mux.Handle("/", noCacheHandler(http.FileServer(http.Dir("static")))) log.Printf("[https] listening on :443") go func() { diff --git a/static/style.css b/static/style.css index da5c48b..9a92d7c 100644 --- a/static/style.css +++ b/static/style.css @@ -750,6 +750,7 @@ body.sacn-mode .node.sacn-out.sacn-in .sacn-in-hover .sacn-detail-wrapper { text-align: center; min-width: 120px; cursor: pointer; + white-space: pre-line; } .flow-node:hover {