Stomp set-cookie

set-cookie causes the cache to not cache the page. Since we’re not trying to track the user beyond, we don’t want to try resetting the cookie again with the same info
parent 1083a7a7
...@@ -95,6 +95,8 @@ var FastlyConfigMethods = { ...@@ -95,6 +95,8 @@ var FastlyConfigMethods = {
'if (' + condition + ') {\n' + 'if (' + condition + ') {\n' +
' if (req.url ~ "^/projects/" && !req.http.Cookie:scratchsessionsid) {\n' + ' if (req.url ~ "^/projects/" && !req.http.Cookie:scratchsessionsid) {\n' +
' set beresp.http.Vary = "Accept-Encoding, Accept-Language";\n' + ' set beresp.http.Vary = "Accept-Encoding, Accept-Language";\n' +
' unset beresp.http.set-cookie;\n' +
' return(deliver);\n' +
' } else {\n' + ' } else {\n' +
' set beresp.ttl = 0s;\n' + ' set beresp.ttl = 0s;\n' +
' set beresp.grace = 0s;\n' + ' set beresp.grace = 0s;\n' +
......
...@@ -65,6 +65,8 @@ tap.test('testSetTTL', function (t) { ...@@ -65,6 +65,8 @@ tap.test('testSetTTL', function (t) {
'if (itsactuallyttyl) {\n' + 'if (itsactuallyttyl) {\n' +
' if (req.url ~ "^/projects/" && !req.http.Cookie:scratchsessionsid) {\n' + ' if (req.url ~ "^/projects/" && !req.http.Cookie:scratchsessionsid) {\n' +
' set beresp.http.Vary = "Accept-Encoding, Accept-Language";\n' + ' set beresp.http.Vary = "Accept-Encoding, Accept-Language";\n' +
' unset beresp.http.set-cookie;\n' +
' return(deliver);\n' +
' } else {\n' + ' } else {\n' +
' set beresp.ttl = 0s;\n' + ' set beresp.ttl = 0s;\n' +
' set beresp.grace = 0s;\n' + ' set beresp.grace = 0s;\n' +
......
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