开发者

Disable caching for certian IP's using varnish

开发者 https://www.devze.com 2023-04-12 13:38 出处:网络
Is it possible to let clients with certain IP\'s pass thru to th开发者_运维问答e backend and not cache using varnish? I don\'t see this in any of the example configs.i think better way is described he

Is it possible to let clients with certain IP's pass thru to th开发者_运维问答e backend and not cache using varnish? I don't see this in any of the example configs.


i think better way is described here https://www.varnish-cache.org/lists/pipermail/varnish-misc/2011-October/021278.html

if you have list of IP's you should create an acl list:

acl passem {
        "192.168.55.0/24";
}

and then in vcl.recv you should

  if (client.ip ~ passem) {
    return(pass);
  }


I received this answer from the mailing list.

Yes, you can:

if (client.ip == IP)
{
return(pass);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消