VCL snippets for Varnish Cache 4
The purpose of this repository is to gather a set of VCL snippets for specific use cases. The files should include comments and tests.
- Edge Side Includes (ESI)
- Grace mode and stale-while-revalidate
- HTTP to HTTPS redirect based on X-Forwarded-Proto
- Lurker friendly bans
- Range requests from clients
- Regexp cache invalidation
- Regular redirect
- Retry a backend request when using a single backend
- Retry a backend request to a new backend when using a random director
- Retry a backend request to a new backend when using a round-robin director
- Serving stale content on slow backend responses
- Vary
Pull requests are welcome.