Commit 2912aa6d authored by Federico G. Schwindt's avatar Federico G. Schwindt

Merge pull request #29 from afletch/master

Fix X-UA-Device-force cookie
parents eb52fd3a 73584feb
......@@ -27,15 +27,14 @@ sub vcl_recv {
sub vcl_synth {
if (resp.status == 701 || 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.status = 200;
} else {
set resp.http.Set-Cookie = "X-UA-Device-force=" + resp.reason + "; Path=/;";
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";
synthetic {"<html><body><h1>OK, Cookie updated</h1><a href='/devicetest/'>/devicetest/</a></body></html>"};
set resp.response = "OK";
return(deliver);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment