Ori.livneh has submitted this change and it was merged.
Change subject: grafana: set Cache-Control: no-cache on dashboard definitions
......................................................................
grafana: set Cache-Control: no-cache on dashboard definitions
Prevent dashboard definitions from getting cached by setting Cache-Control:
no-cache header on the response.
Change-Id: Ib5c84a2b5388c9553939902ec11934b62f51c5e3
---
M modules/grafana/manifests/web/apache.pp
M modules/grafana/templates/grafana.apache.erb
2 files changed, 5 insertions(+), 1 deletion(-)
Approvals:
Ori.livneh: Verified; Looks good to me, approved
diff --git a/modules/grafana/manifests/web/apache.pp
b/modules/grafana/manifests/web/apache.pp
index b0f98d2..1b37e4e 100644
--- a/modules/grafana/manifests/web/apache.pp
+++ b/modules/grafana/manifests/web/apache.pp
@@ -28,6 +28,7 @@
include ::apache::mod::proxy_balancer
include ::apache::mod::proxy_http
include ::apache::mod::lbmethod_byrequests
+ include ::apache::mod::headers
apache::site { 'grafana':
ensure => $ensure,
diff --git a/modules/grafana/templates/grafana.apache.erb
b/modules/grafana/templates/grafana.apache.erb
index aab19ed..9afabba 100644
--- a/modules/grafana/templates/grafana.apache.erb
+++ b/modules/grafana/templates/grafana.apache.erb
@@ -29,7 +29,10 @@
</Directory>
<%- if @elastic_backends -%>
- ProxyPassMatch ^(/grafana-dashboards/.*)$ balancer://elastic$1
+ <LocationMatch ^(/grafana-dashboards/.*)$>
+ ProxyPassMatch balancer://elastic$1
+ Header set Cache-Control no-cache
+ </LocationMatch>
ProxyPassReverse /grafana-dashboards balancer://elastic
<Proxy balancer://elastic>
--
To view, visit https://gerrit.wikimedia.org/r/232834
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib5c84a2b5388c9553939902ec11934b62f51c5e3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits