App Plugins: Allow resource handle to define Cache-Control Header (#92559)

This commit is contained in:
Jan-Otto Kröpke
2024-09-17 10:28:38 +02:00
committed by GitHub
parent 4f21ecf982
commit e2bce38a79
2 changed files with 19 additions and 2 deletions

View File

@ -33,6 +33,7 @@ func AddDefaultResponseHeaders(cfg *setting.Cfg) web.Handler {
t := web.NewTree()
t.Add("/api/datasources/uid/:uid/resources/*", nil)
t.Add("/api/datasources/:id/resources/*", nil)
t.Add("/api/plugins/:id/resources/*", nil)
return func(c *web.Context) {
c.Resp.Before(func(w web.ResponseWriter) { // if response has already been written, skip.