API: Change how Cache-Control and related headers are set (#62021)

- change Cache-Control from no-cache to no-store
- do not set (and remove if set) older Pragma/Expires
This commit is contained in:
Kyle Brandt
2023-01-25 09:09:27 -05:00
committed by GitHub
parent 0d7e303809
commit 13de1afcbe
2 changed files with 10 additions and 10 deletions

View File

@@ -69,9 +69,9 @@ func addSecurityHeaders(w web.ResponseWriter, cfg *setting.Cfg) {
}
func addNoCacheHeaders(w web.ResponseWriter) {
w.Header().Set("Cache-Control", "no-cache")
w.Header().Set("Pragma", "no-cache")
w.Header().Set("Expires", "-1")
w.Header().Set("Cache-Control", "no-store")
w.Header().Del("Pragma")
w.Header().Del("Expires")
}
func addXFrameOptionsDenyHeader(w web.ResponseWriter) {