Closed ocean90 closed 7 years ago
To check existing bans you can use varnishadm
:
sudo varnishadm
200
-----------------------------
Varnish Cache CLI 1.0
-----------------------------
Linux,3.13.0-98-generic,x86_64,-smalloc,-smalloc,-hcritbit
varnish-3.0.5 revision 1a89b1f
Type 'help' for command list.
Type 'quit' to close CLI session.
varnish> ban.list
200
Present bans:
1492606003.613166 2 obj.http.X-Req-URL ~ /something/.* && obj.http.X-Req-Host == example.org
great, thanks @ocean90
Example:
curl -X PURGE -H "Host: example.org" -H "X-Forwarded-Proto: https" -H "X-Forwarded-Proto: https" -H "X-Purge-Method: regex" 127.0.0.1:6081/something/.*
Docs: https://www.varnish-cache.org/docs/3.0/tutorial/purging.html#bans
See #47.