Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-devicedetect
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-devicedetect
Commits
74ef3200
Commit
74ef3200
authored
Mar 06, 2012
by
Lasse Karstensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use proper RST comment syntax
parent
d6f18826
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
INSTALL.rst
INSTALL.rst
+8
-8
No files found.
INSTALL.rst
View file @
74ef3200
...
@@ -43,7 +43,7 @@ Redirecting mobile clients
...
@@ -43,7 +43,7 @@ Redirecting mobile clients
If you want to redirect mobile clients you can use the following snippet.
If you want to redirect mobile clients you can use the following snippet.
..
.
065-redir-mobile-start
.. 065-redir-mobile-start
VCL::
VCL::
include "devicedetect.vcl";
include "devicedetect.vcl";
...
@@ -63,7 +63,7 @@ VCL::
...
@@ -63,7 +63,7 @@ VCL::
}
}
}
}
..
.
065-redir-mobile-end
.. 065-redir-mobile-end
Signaling device type to the backend
Signaling device type to the backend
------------------------------------
------------------------------------
...
@@ -79,7 +79,7 @@ backend requests, and the backend mentions in the response Vary header that the
...
@@ -79,7 +79,7 @@ backend requests, and the backend mentions in the response Vary header that the
content is dependant on this header. Everything works out of the box from
content is dependant on this header. Everything works out of the box from
Varnish's perspective.
Varnish's perspective.
..
.
071-example1-start
.. 071-example1-start
Example VCL::
Example VCL::
include "devicedetect.vcl";
include "devicedetect.vcl";
...
@@ -95,7 +95,7 @@ Example VCL::
...
@@ -95,7 +95,7 @@ Example VCL::
# completed.
# completed.
sub vcl_miss { call add_x-ua-device; }
sub vcl_miss { call add_x-ua-device; }
sub vcl_pass { call add_x-ua-device; }
sub vcl_pass { call add_x-ua-device; }
..
.
071-example1-end
.. 071-example1-end
Please remember that the backend must send a Vary header on User-Agent, or you will need to add that manually. See below for an example.
Please remember that the backend must send a Vary header on User-Agent, or you will need to add that manually. See below for an example.
...
@@ -117,7 +117,7 @@ for this is for CGI scripts where only a small set of predefined headers are
...
@@ -117,7 +117,7 @@ for this is for CGI scripts where only a small set of predefined headers are
To make sure that any caches out on the Internet doesn't cache it, a Vary header
To make sure that any caches out on the Internet doesn't cache it, a Vary header
on User-Agent must be added on the way out.
on User-Agent must be added on the way out.
..
.
072-example2-start
.. 072-example2-start
VCL::
VCL::
include "devicedetect.vcl";
include "devicedetect.vcl";
...
@@ -155,7 +155,7 @@ VCL::
...
@@ -155,7 +155,7 @@ VCL::
}
}
..
.
072-example2-end
.. 072-example2-end
Example 3: Add the device class as a GET query parameter
Example 3: Add the device class as a GET query parameter
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
...
@@ -166,7 +166,7 @@ If everything else fails, you can add the device type as a GET argument.
...
@@ -166,7 +166,7 @@ If everything else fails, you can add the device type as a GET argument.
The same Vary trickery from Example 2 must be added here also.
The same Vary trickery from Example 2 must be added here also.
..
.
073-example3-start
.. 073-example3-start
VCL::
VCL::
include "devicedetect.vcl";
include "devicedetect.vcl";
...
@@ -202,7 +202,7 @@ VCL::
...
@@ -202,7 +202,7 @@ VCL::
}
}
}
}
..
.
073-example3-end
.. 073-example3-end
Testing tools
Testing tools
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment