summaryrefslogtreecommitdiffstats
path: root/roles/varnish
diff options
context:
space:
mode:
authorMikolaj Izdebski <mizdebsk@redhat.com>2015-05-04 13:19:42 +0200
committerMikolaj Izdebski <mizdebsk@redhat.com>2015-05-07 09:25:27 +0000
commit7d480abcbf5f004965bb948cbdeb2c67e57e217c (patch)
treeca1ba90f1ae43725462bdc6929ee4850a8f722a9 /roles/varnish
parentc61a0adcf518259a849f56ca58a060e82c13a357 (diff)
downloadansible-7d480abcbf5f004965bb948cbdeb2c67e57e217c.tar.gz
ansible-7d480abcbf5f004965bb948cbdeb2c67e57e217c.tar.xz
ansible-7d480abcbf5f004965bb948cbdeb2c67e57e217c.zip
Add proxy configuration for Koschei staging
Diffstat (limited to 'roles/varnish')
-rw-r--r--roles/varnish/files/proxy.vcl12
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/varnish/files/proxy.vcl b/roles/varnish/files/proxy.vcl
index 14e884612..0deb289b3 100644
--- a/roles/varnish/files/proxy.vcl
+++ b/roles/varnish/files/proxy.vcl
@@ -123,6 +123,11 @@ backend mirrormanager2 {
.port = "10039";
}
+backend koschei {
+ .host = "localhost";
+ .port = "10040";
+}
+
acl purge {
"192.168.1.129"; // wiki01.vpn
@@ -246,6 +251,13 @@ sub vcl_recv {
set req.url = regsub(req.url, "\?.*", "");
}
}
+ if (req.http.X-Forwarded-Server ~ "^koschei.fedoraproject.org") {
+ set req.backend_hint = koschei;
+ if (req.url ~ "^/static/") {
+ unset req.http.cookie;
+ set req.url = regsub(req.url, "\?.*", "");
+ }
+ }
if (req.http.X-Forwarded-Server ~ "^qa.fedoraproject.org") {
if (req.url ~ "^/blockerbugs") {
set req.backend_hint = blockerbugs;