library mobiledetect-varnish
Varnish VCL device-detect based on Mobile_Detect
9gag-open-source/mobiledetect-varnish
Varnish VCL device-detect based on Mobile_Detect
- Thursday, September 28, 2017
- by derek9gag
- Repository
- 1 Watchers
- 0 Stars
- 35 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 4 Versions
- 6 % Grown
Mobile_Detect Varnish
A tool to generate VCL function for Varnish using rules from Mobile_Detect., (*1)
Based on varnish-mobiletranslate., (*2)
Intended to be a drop-in replacement for devicedetect., (*3)
Installation
composer install 9gag-open-source/mobiledetect-varnish
Generating Varnish VCL
$generator = new \Detection\MobileDetect\Varnish\DeviceDetect();
echo $generator->generateVcl();
Using the VCL
Include the generated code in your Varnish VCL. The devicedetect function adds a X-UA-Device header to the request., (*4)
| Device Type |
X-UA-Device |
| Phone |
mobile |
| Tablet |
tablet |
| Crawler bots |
bot |
| Other |
desktop |
dev-master
9999999-dev
Varnish VCL device-detect based on Mobile_Detect
Sources
Download
MIT
The Requires
0.2.0
0.2.0.0
Varnish VCL device-detect based on Mobile_Detect
Sources
Download
MIT
The Requires
0.1.1
0.1.1.0
Varnish VCL device-detect based on Mobile_Detect
Sources
Download
MIT
The Requires
0.1.0
0.1.0.0
Varnish VCL device-detect based on Mobile_Detect
Sources
Download
The Requires