Add Cache-Control header to custom css/js (#3434)

This commit is contained in:
DingDongSoLong4 2023-02-16 01:29:04 +02:00 committed by GitHub
parent 8ab095f675
commit 0c9eeef143
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -339,6 +339,9 @@ func serveFiles(w http.ResponseWriter, r *http.Request, name string, paths []str
}
}
// Always revalidate with server
w.Header().Set("Cache-Control", "no-cache")
bufferReader := bytes.NewReader(buffer.Bytes())
http.ServeContent(w, r, name, latestModTime, bufferReader)
}