We need to typecast this. String != IP

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2017-04-06 00:17:28 +00:00
parent 3c12da859e
commit 483c774e5c

View file

@ -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/") {