Mark Bergsma has submitted this change and it was merged.

Change subject: Add Text Varnish VCL include boilerplate
......................................................................


Add Text Varnish VCL include boilerplate

Change-Id: I30e01bef55a63f1657ae4236d1e75a2f8ea74c96
---
A templates/varnish/text-backend.inc.vcl.erb
A templates/varnish/text-frontend.inc.vcl.erb
2 files changed, 25 insertions(+), 0 deletions(-)

Approvals:
  Mark Bergsma: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/varnish/text-backend.inc.vcl.erb 
b/templates/varnish/text-backend.inc.vcl.erb
new file mode 100644
index 0000000..211d656
--- /dev/null
+++ b/templates/varnish/text-backend.inc.vcl.erb
@@ -0,0 +1,15 @@
+# Varnish VCL include file for text backends
+
+sub vcl_recv {
+       call vcl_recv_purge;
+<% if cluster_tier == 1 -%>
+
+       if ( req.http.host ~ "^test\." ) {
+               set req.backend = test_wikipedia;
+               return (pass);
+       }
+       if (req.url ~ "^/w/api.php") {
+               set req.backend = api;
+       }
+<% end -%>
+}
diff --git a/templates/varnish/text-frontend.inc.vcl.erb 
b/templates/varnish/text-frontend.inc.vcl.erb
new file mode 100644
index 0000000..dae4abb
--- /dev/null
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -0,0 +1,10 @@
+# Varnish VCL include file for text frontends
+
+sub vcl_recv {
+       /* Allow purging */
+       call vcl_recv_purge;
+
+       /* make absolute URIs relative as to not have to rewrite them too;
+        * do this after vcl_recv_purge, as it operates on a full URI */
+       call rewrite_proxy_urls;
+}
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/65253
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I30e01bef55a63f1657ae4236d1e75a2f8ea74c96
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma <[email protected]>
Gerrit-Reviewer: Mark Bergsma <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to