Two VMODs for Varnish Cache and Vinyl Cache. fiftyonedegrees.start() in vcl_init loads a Device Detection data file, then set req.http.x-device = fiftyonedegrees.match_all("HardwareName,BrowserName,PlatformName") in vcl_recv hands the device to your backend.
For IP Intelligence, fiftyonedegrees_ipi.match() looks up client.ip or an address you pass, such as req.http.X-Real-IP behind a load balancer, and reload() keeps the old data if a new file fails. Tested on Varnish Cache 6.0, 9.0, and 9.1, and Vinyl Cache 9.0 and 9.1. Human Confidence and Identifiers sit outside the VMODs, in the 51Degrees cloud service.
Build from source with ./autogen.sh, ./configure, make, and sudo make install.
Code and issues: https://github.com/51Degrees/51degrees-varnish
Documentation: https://51degrees.com/documentation/_device_detection__other_integrations__varnish.html?utm_source=sourceforge&utm_medium=listing&utm_campaign=51degrees-varnish&utm_content=description&utm_term=docs
Features
- Device Detection VMOD with match_single and match_all
- IP Intelligence VMOD with weighted values
- Client Hints requested by set_resp_headers
- JavaScript properties served from vcl_synth
- IP data reload that keeps the old data on failure
- Varnish Cache 6.0 to 9.1 and Vinyl Cache 9.0 and 9.1
- Human Confidence and Identifiers kept in the cloud service
- EUPL 1.2 licensed source