mirror of
1
Fork 0

Fix #3030 add Cache-Control header for health-check

This commit is contained in:
Ada 2024-04-05 18:20:04 +02:00
parent 5ae3098faa
commit b210a3ebd5
No known key found for this signature in database
GPG Key ID: 6A7F898157C6DE6E
1 changed files with 1 additions and 0 deletions

View File

@ -85,6 +85,7 @@ func Check(w http.ResponseWriter, r *http.Request) {
data, _ := json.MarshalIndent(rsp, "", " ") data, _ := json.MarshalIndent(rsp, "", " ")
w.Header().Set("Content-Type", "application/json") w.Header().Set("Content-Type", "application/json")
w.Header().Set("Cache-Control", "no-store, no-cache, max-age=0, must-revalidate, proxy-revalidate")
w.WriteHeader(rsp.Status.ToHTTPStatus()) w.WriteHeader(rsp.Status.ToHTTPStatus())
_, _ = w.Write(data) _, _ = w.Write(data)
} }