Mailing List Archive

[master] d96e763 Include device class when hashing
commit d96e763c12f2d7229fd642e6e4900fb48fd37586
Author: Lasse Karstensen <lasse@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
--------------------------

_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit