Add no-cache headers to static files, fix flow view multi-line names
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
9
http.go
9
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() {
|
func (t *Tendrils) startHTTPServer() {
|
||||||
if err := ensureCert(); err != nil {
|
if err := ensureCert(); err != nil {
|
||||||
log.Printf("[ERROR] failed to ensure certificate: %v", err)
|
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", t.handleAPIStatus)
|
||||||
mux.HandleFunc("/api/status/stream", t.handleAPIStatusStream)
|
mux.HandleFunc("/api/status/stream", t.handleAPIStatusStream)
|
||||||
mux.HandleFunc("/api/errors/clear", t.handleClearError)
|
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")
|
log.Printf("[https] listening on :443")
|
||||||
go func() {
|
go func() {
|
||||||
|
|||||||
@@ -750,6 +750,7 @@ body.sacn-mode .node.sacn-out.sacn-in .sacn-in-hover .sacn-detail-wrapper {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
min-width: 120px;
|
min-width: 120px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
white-space: pre-line;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flow-node:hover {
|
.flow-node:hover {
|
||||||
|
|||||||
Reference in New Issue
Block a user