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
2912aa6d
Commit
2912aa6d
authored
Dec 10, 2015
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #29 from afletch/master
Fix X-UA-Device-force cookie
parents
eb52fd3a
73584feb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
devicedetect-dev.vcl
devicedetect-dev.vcl
+2
-3
No files found.
devicedetect-dev.vcl
View file @
2912aa6d
...
@@ -27,15 +27,14 @@ sub vcl_recv {
...
@@ -27,15 +27,14 @@ sub vcl_recv {
sub vcl_synth {
sub vcl_synth {
if (resp.status == 701 || resp.status == 702) {
if (resp.status == 701 || resp.status == 702) {
if (resp.status == 702) {
if (resp.status == 702) {
set resp.status = 200;
set resp.http.Set-Cookie = "X-UA-Device-force=expiring; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
set resp.http.Set-Cookie = "X-UA-Device-force=expiring; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
set resp.status = 200;
} else {
} else {
set resp.http.Set-Cookie = "X-UA-Device-force=" + resp.reason + "; Path=/;";
set resp.status = 200;
set resp.status = 200;
set resp.http.Set-Cookie = "X-UA-Device-force=" + resp.response + "; Path=/;";
}
}
set resp.http.Content-Type = "text/html; charset=utf-8";
set resp.http.Content-Type = "text/html; charset=utf-8";
synthetic {"
<html><body><h1>
OK, Cookie updated
</h1><a
href=
'/devicetest/'
>
/devicetest/
</a></body></html>
"};
synthetic {"
<html><body><h1>
OK, Cookie updated
</h1><a
href=
'/devicetest/'
>
/devicetest/
</a></body></html>
"};
set resp.response = "OK";
return(deliver);
return(deliver);
}
}
}
}
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