<HTML>
<HEAD>
<TITLE>Return Lookup</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hello,<BR>
<BR>
Hopefully a short question:<BR>
<BR>
We have the following code in our VCL file:<BR>
<BR>
sub vcl_recv {<BR>
<BR>
# Purge through http<BR>
if (req.request == "PURGE") {<BR>
if (!client.ip ~ purge) {<BR>
error 405 "Not allowed.";<BR>
}<BR>
ban("req.url =" + req.url + "&& req.http.host =" + req.http.host);<BR>
error 200 "Purged.";<BR>
}<BR>
<BR>
if (req.http.cookie) {<BR>
unset req.http.cookie;<BR>
return (lookup);<BR>
}<BR>
<BR>
if (req.http.host ~ "example.url.com") {<BR>
set req.backend = live;<BR>
}<BR>
else {<BR>
error 404 "Unkown Virtual host";<BR>
}<BR>
<BR>
When our request ( example.url.com/asdja?adn23 ) comes in we see that the backend is selected which it first came across. We’ve could pinpoint it to the unset.req.http.cookie part. If we move the unset cookie part under the req.http.host ~ "example.url.com" part it all goes fine.<BR>
<BR>
Can it be that the return(lookup); in the unset req.http.cookie part skips the req.http.host part? And thus the first backend is selected?<BR>
<BR>
Thank you.<BR>
<BR>
Regards,<BR>
Jaap </SPAN></FONT>
</BODY>
</HTML>