Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
maciekrb CreditAttribution: maciekrb commentedI realized this bug should be reported under the Varnish module instead of expire. I will move accordingly.
Comment #2
SpleshkaOkay, lets move this issue there.
Comment #3
mfernea CreditAttribution: mfernea at AmeXio commentedThis duplicates #2340829: Leading slash missing from ban URLs.