Export: Remove no-store headers in pdf and image previews (#78844)

This commit is contained in:
Ezequiel Victorero
2023-12-18 09:21:57 -03:00
committed by GitHub
parent 10cc3321cd
commit 864d91ed3e
3 changed files with 20 additions and 1 deletions
+3 -1
View File
@@ -49,7 +49,9 @@ func AddDefaultResponseHeaders(cfg *setting.Cfg) web.Handler {
resourceCachable := resourceURLMatch && allowCacheControl(c.Resp)
if !strings.HasPrefix(c.Req.URL.Path, "/public/plugins/") &&
!strings.HasPrefix(c.Req.URL.Path, "/avatar/") &&
!strings.HasPrefix(c.Req.URL.Path, "/api/datasources/proxy/") && !resourceCachable {
!strings.HasPrefix(c.Req.URL.Path, "/api/datasources/proxy/") &&
!strings.HasPrefix(c.Req.URL.Path, "/api/reports/render/") &&
!strings.HasPrefix(c.Req.URL.Path, "/render/d-solo/") && !resourceCachable {
addNoCacheHeaders(c.Resp)
}