Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
1dd05602
Commit
1dd05602
authored
Mar 01, 2011
by
Bjoern Ruberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typos
parent
193a8c71
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
cookies.rst
doc/sphinx/tutorial/cookies.rst
+4
-4
No files found.
doc/sphinx/tutorial/cookies.rst
View file @
1dd05602
...
...
@@ -15,7 +15,7 @@ interest to the server.
For a lot of web application it makes sense to completely disregard the
cookies unless you are accessing a special part of the web site. This
VCL snippet in vcl_recv will disregard cookies unless you are
accessing /admin/
.
::
accessing /admin/::
if ( !( req.url ~ ^/admin/) ) {
unset req.http.Cookie;
...
...
@@ -37,15 +37,15 @@ cookies and since Varnish will cease caching of pages when the client
sends cookies we will discard these unnecessary cookies in VCL.
In the following VCL we discard all cookies that start with a
underscore
.
::
underscore::
// Remove has_js and Google Analytics __* cookies.
set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(_[_a-z]+|has_js)=[^;]*", "");
// Remove a ";" prefix, if present.
set req.http.Cookie = regsub(req.http.Cookie, "^;\s*", "");
Let me show you an example where we remove everything
the the cookies
named COOKIE1 and COOKIE2 and you can marvel at it.
::
Let me show you an example where we remove everything
except the
cookies named COOKIE1 and COOKIE2 and you can marvel at it
::
sub vcl_recv {
if (req.http.Cookie) {
...
...
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