Skip to content

Commit 3eab81f

Browse files
authored
Fix go-gitea#3030 add Cache-Control header for health-check
(cherry picked from commit b210a3e)
1 parent 7e5fed7 commit 3eab81f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

routers/web/healthcheck/check.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ func Check(w http.ResponseWriter, r *http.Request) {
8585

8686
data, _ := json.MarshalIndent(rsp, "", " ")
8787
w.Header().Set("Content-Type", "application/json")
88+
w.Header().Set("Cache-Control", "no-store, no-cache, max-age=0, must-revalidate, proxy-revalidate")
8889
w.WriteHeader(rsp.Status.ToHTTPStatus())
8990
_, _ = w.Write(data)
9091
}

0 commit comments

Comments
 (0)