fix: prevent stale web ui caching
This commit is contained in:
@@ -18,6 +18,9 @@ func TestRootAndAPIDoc(t *testing.T) {
|
||||
if r.Code != 200 || !strings.Contains(r.Body.String(), "<title>My Files</title>") || !strings.Contains(r.Body.String(), "<strong>Hello</strong>") {
|
||||
t.Fatalf("root: %d %s", r.Code, r.Body.String())
|
||||
}
|
||||
if got := r.Header().Get("Cache-Control"); got != "no-store" {
|
||||
t.Fatalf("root cache-control=%q", got)
|
||||
}
|
||||
r = httptest.NewRecorder()
|
||||
h.ServeHTTP(r, httptest.NewRequest(http.MethodGet, "/asset/api.html", nil))
|
||||
if r.Code != 200 || !strings.Contains(r.Body.String(), "/chfs/files") {
|
||||
|
||||
Reference in New Issue
Block a user