Merge patch to have nuancier use Varnish (#3294C14,17)
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
bbcae051b2
commit
53b20e51da
2 changed files with 20 additions and 1 deletions
|
@ -92,7 +92,7 @@
|
||||||
localpath: /nuancier
|
localpath: /nuancier
|
||||||
remotepath: /nuancier
|
remotepath: /nuancier
|
||||||
header_scheme: true
|
header_scheme: true
|
||||||
proxyurl: http://localhost:10035
|
proxyurl: "{{ varnish_url }}"
|
||||||
|
|
||||||
- role: httpd/reverseproxy
|
- role: httpd/reverseproxy
|
||||||
website: apps.fedoraproject.org
|
website: apps.fedoraproject.org
|
||||||
|
|
|
@ -62,6 +62,11 @@ sub vcl_init {
|
||||||
fas.add_backend(fas03);
|
fas.add_backend(fas03);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
backend nuancier {
|
||||||
|
.host = "localhost";
|
||||||
|
.port = "10035";
|
||||||
|
}
|
||||||
|
|
||||||
backend voting {
|
backend voting {
|
||||||
.host = "localhost";
|
.host = "localhost";
|
||||||
.port = "10007";
|
.port = "10007";
|
||||||
|
@ -285,6 +290,20 @@ sub vcl_recv {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (req.http.X-Forwarded-Server ~ "^apps.fedoraproject.org") {
|
||||||
|
if (req.url ~ "^/nuancier") {
|
||||||
|
set req.backend_hint = nuancier;
|
||||||
|
if (req.url ~ "^/nuancier/static/") {
|
||||||
|
unset req.http.cookie;
|
||||||
|
set req.url = regsub(req.url, "\?.*", "");
|
||||||
|
}
|
||||||
|
if (req.url ~ "^/nuancier/cache/") {
|
||||||
|
unset req.http.cookie;
|
||||||
|
set req.url = regsub(req.url, "\?.*", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Pass any requests with the "If-None-Match" header directly.
|
# Pass any requests with the "If-None-Match" header directly.
|
||||||
if (req.http.If-None-Match) {
|
if (req.http.If-None-Match) {
|
||||||
return (pass);
|
return (pass);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue