diff options
| author | Patrick Uiterwijk <puiterwijk@redhat.com> | 2017-02-09 20:58:28 +0000 |
|---|---|---|
| committer | Patrick Uiterwijk <puiterwijk@redhat.com> | 2017-02-09 20:58:28 +0000 |
| commit | 2969cf485ecaafda50088d256581ef0e236e6c10 (patch) | |
| tree | ecc43cddfbdd2263157becb76761c2b7f937d70a /roles/varnish | |
| parent | 918dd8bf907a8cb8a4ef4ac6e6c8aa8489715e58 (diff) | |
| download | ansible-2969cf485ecaafda50088d256581ef0e236e6c10.tar.gz ansible-2969cf485ecaafda50088d256581ef0e236e6c10.tar.xz ansible-2969cf485ecaafda50088d256581ef0e236e6c10.zip | |
Do not cache registry blobs
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Diffstat (limited to 'roles/varnish')
| -rw-r--r-- | roles/varnish/templates/proxy.vcl.j2 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/roles/varnish/templates/proxy.vcl.j2 b/roles/varnish/templates/proxy.vcl.j2 index 563383c33..a1043622c 100644 --- a/roles/varnish/templates/proxy.vcl.j2 +++ b/roles/varnish/templates/proxy.vcl.j2 @@ -193,6 +193,12 @@ sub vcl_recv { if (req.http.X-Forwarded-Server ~ "^registry.fedoraproject.org" || req.http.X-Forwarded-Server ~ "^registry.stg.fedoraproject.org") { set req.backend_hint = registry; + unset req.http.cookie; + set req.http.clear-cookies = "yes"; + set req.url = regsub(req.url, "\?.*", ""); + if (req.url ~ "/blobs/") { + return(pass); + } } if (req.url ~ "^/wiki/") { set req.backend_hint = wiki; |
