plone-varnish: the first line of defence for your Plone site
What it does
- Scans answered right away. Requests for
.php,wp-login,.env,.gitor the login pages of other software are answered by Varnish itself. On one production site, that was 1,753 of the 2,257 scanner requests in a single day. - No more server errors from broken requests. Invalid characters, attempts to get outside the site and nonsense search parameters get a proper error message instead of an error in Plone.
- Scrapers slowed down. At most 100 requests per 10 seconds per visitor go through to Plone. Pages from the cache don't count, so regular visitors never notice.
- A cache that understands Plone. It follows the settings of plone.app.caching, never caches the pages of logged-in users, and shows the last version of a page when Plone is briefly unavailable.
- One image, one short file. A site keeps its own configuration of about 50 lines. Better rules come with a new version of the image.
Why open source
The attacks are the same for every Plone site. When we share the rules, every Plone site benefits, and we learn from what others run into. Every rule has a test, and the examples run with Plone 6.2 and Volto 19. We use plone-varnish on the Plone sites we maintain, and keep the rules up to date as scanners try new things.
Do you run collective.matomoaitracker? Since version 1.2.0, its Varnish configuration is included in the image.
Try it
Try it on your site and let us know how it goes: a request that should have been stopped, a page that should have been cached, or a rule that stops a real visitor.
