[experimental-ims] d96e763 Include device class when hashing

Lasse Karstensen lasse at varnish-software.com
Thu Dec 18 10:27:41 CET 2014


commit d96e763c12f2d7229fd642e6e4900fb48fd37586
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