Bans sent to varnish are currently formatted as follows :

  ban req.http.host ~ www.somedomain.com && req.url ~ ^$|^inicio$|^node/13588$|^somesection/some-article-name$

Pages stored internally by varnish actually seem to contain the trailing "/" at the beginning, as suggested by running :
varnishlog -b -o -i TxURL

Although some of the bans seem to work, I believe the trailing "/" should actually be included in the ban expression as follows :

 ban req.http.host ~ www.somedomain.com && req.url ~ ^/$|^/inicio$|^/node/13588$|^/somesection/some-article-name$

I've tested this directly by issuing the bans to varnish and checking the ban.list. The ^$ expression does not seem to actually ban the main page, ^/$ does.

Cheers

Comments

maciekrb’s picture

I realized this bug should be reported under the Varnish module instead of expire. I will move accordingly.

Spleshka’s picture

Project: Cache Expiration » Varnish
Version: 7.x-2.x-dev » 7.x-1.x-dev

Okay, lets move this issue there.

mfernea’s picture

Status: Active » Closed (duplicate)