diff --git a/roles/varnish/templates/kojipkgs.vcl.j2 b/roles/varnish/templates/kojipkgs.vcl.j2 index af68e0cbae..1a0011a98e 100644 --- a/roles/varnish/templates/kojipkgs.vcl.j2 +++ b/roles/varnish/templates/kojipkgs.vcl.j2 @@ -1,5 +1,6 @@ vcl 4.0; +import std; import directors; # @@ -46,7 +47,7 @@ sub vcl_recv { return(purge); } - if (req.url ~ "^/repo/" && !(req.http.x-forwarded-for ~ repoallowed)) { + if (req.url ~ "^/repo/" && !(std.ip(req.http.X-Forwarded-For, "0.0.0.0") ~ repoallowed)) { return(synth(403, "Access denied.")); } if (req.url ~ "^/mash/") {