BBlack has submitted this change and it was merged. Change subject: Compress js (and other text) in varnish ......................................................................
Compress js (and other text) in varnish do_gzip will compress content on its way *into* the cache, if the backend didn't already compress it for varnish. It should be harmless for types the backend is already compressing, but it's nice to have the fallback here for content that the backend isn't configured to compress. This regex should cover the most common cases... Bug: T109040 Change-Id: I41453814b7e50cd6e3930eb6bb2d7d2a4ca5b66f --- M modules/varnish/templates/vcl/wikimedia.vcl.erb 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Krinkle: Looks good to me, but someone else must approve BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb b/modules/varnish/templates/vcl/wikimedia.vcl.erb index 933d4eb..f2c3aed 100644 --- a/modules/varnish/templates/vcl/wikimedia.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb @@ -466,8 +466,8 @@ set beresp.grace = 60m; <% if @vcl_config.fetch("do_gzip", false) -%> - // Compress ico and SVG files - if (beresp.http.content-type ~ "^image/(x-icon|vnd\.microsoft\.icon|svg\+xml)$") { + // Compress compressible things if the backend didn't already + if (beresp.http.content-type ~ "^text/|^image/(x-icon|vnd\.microsoft\.icon)|(xml|html|javascript|json)$") { set beresp.do_gzip = true; } <% end -%> -- To view, visit https://gerrit.wikimedia.org/r/237369 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I41453814b7e50cd6e3930eb6bb2d7d2a4ca5b66f Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack <bbl...@wikimedia.org> Gerrit-Reviewer: BBlack <bbl...@wikimedia.org> Gerrit-Reviewer: Faidon Liambotis <fai...@wikimedia.org> Gerrit-Reviewer: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits