Client.ip is unusable due to proxies, look at forwarded-for

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2017-04-05 23:51:12 +00:00
parent ac41432c7c
commit 0a7e1e0c03

View file

@ -43,7 +43,7 @@ sub vcl_recv {
return(purge);
}
if (req.url ~ "^/repo/" && !(client.ip ~ repoallowed)) {
if (req.url ~ "^/repo/" && !(req.http.x-forwarded-for ~ repoallowed)) {
return(synth(403, "Access denied."));
}
if (req.url ~ "^/mash/") {