<div dir="ltr">Hi folks.<div><br></div><div>Because my varnish nodes are behind two different proxies, I can't really use client.ip within my VCL. What I have is a header "X-Real-Ip" instead, which is populated automatically by one proxy, and by me derived from the "X-Forwarded-For" for the other.</div><div><br></div><div>What this means is that where I would usually use ACL to block access to a resource:</div><div><br></div><div>    if (req.http.host == "<a href="http://test.mydomain.com">test.mydomain.com</a>") {</div><div>        if (client.ip ~ trustedips) {</div><div>            # allow access</div><div>        } else {</div><div>            return (synth(405, "Not allowed");<br></div><div>        }</div><div>    }</div><div><br></div><div>But this doesn't work if I replace client.ip with a non-IP typed field.</div><div><br></div><div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>Message from VCC-compiler:</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>Expected CSTR got 'purgers'</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>(program line 1193), at</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>('default.vcl' Line 339 Pos 34)</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>if (req.http.X-Real-Ip ~ trustedips) {</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>---------------------------------##########---</div></div><div><br></div><div>Is there any way I can get the same result as this but without using client.ip?</div><div><br></div><div>thanks,</div><div><br></div><div>Mark</div></div>