Ori.livneh has submitted this change and it was merged.
Change subject: Enable gzip of ico and svg files on labs bits
......................................................................
Enable gzip of ico and svg files on labs bits
Change-Id: Ic66e578e402c6a428a792f3f53abf2f00d8e1225
---
M manifests/role/cache.pp
M templates/varnish/bits.inc.vcl.erb
2 files changed, 8 insertions(+), 0 deletions(-)
Approvals:
Ori.livneh: Looks good to me, approved
jenkins-bot: Verified
diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 642b18e..224398f 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -1277,6 +1277,7 @@
$realm_cluster_options = {
'top_domain' => 'beta.wmflabs.org',
'bits_domain' => 'bits.beta.wmflabs.org',
+ 'do_gzip' => true,
}
}
default: {
diff --git a/templates/varnish/bits.inc.vcl.erb
b/templates/varnish/bits.inc.vcl.erb
index bf698e3..d1df615 100644
--- a/templates/varnish/bits.inc.vcl.erb
+++ b/templates/varnish/bits.inc.vcl.erb
@@ -82,6 +82,13 @@
return (hit_for_pass);
}
+<% if @cluster_options.fetch("do_gzip", false) -%>
+ // Compress ico and SVG files
+ if (beresp.http.content-type ~ "^image/(x-icon|svg\+xml)$") {
+ set beresp.do_gzip = true;
+ }
+<% end -%>
+
// Don't run the default vcl_fetch function
return (deliver);
}
--
To view, visit https://gerrit.wikimedia.org/r/197825
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic66e578e402c6a428a792f3f53abf2f00d8e1225
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits