[3.0] 20396aa Include device class when hashing
Tollef Fog Heen
tfheen at varnish-cache.org
Thu May 24 14:47:43 CEST 2012
commit 20396aa7f50ca3c34ad601267b49828ebcc8bf5c
Author: Lasse Karstensen <lasse at varnish-software.com>
Date: Mon Mar 12 16:13:56 2012 +0100
Include device class when hashing
diff --git a/doc/sphinx/tutorial/devicedetection.rst b/doc/sphinx/tutorial/devicedetection.rst
index abf729e..9f02493 100644
--- a/doc/sphinx/tutorial/devicedetection.rst
+++ b/doc/sphinx/tutorial/devicedetection.rst
@@ -228,6 +228,11 @@ special needs in VCL, you can use the X-UA-Device header like this::
set req.backend = mobile;
}
}
+ sub vcl_hash {
+ if (req.http.X-UA-Device) {
+ hash_data(req.http.X-UA-Device);
+ }
+ }
Redirecting mobile clients
--------------------------
More information about the varnish-commit
mailing list