From 483c774e5c070f186aa801e9995ac2c8a9fe8558 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Thu, 6 Apr 2017 00:17:28 +0000 Subject: [PATCH] We need to typecast this. String != IP Signed-off-by: Patrick Uiterwijk --- roles/varnish/templates/kojipkgs.vcl.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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/") {