mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-16 16:19:48 -05:00
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
This commit is contained in:
parent
1083a7a79f
commit
c65b0ef907
2 changed files with 4 additions and 0 deletions
|
@ -95,6 +95,8 @@ var FastlyConfigMethods = {
|
|||
'if (' + condition + ') {\n' +
|
||||
' if (req.url ~ "^/projects/" && !req.http.Cookie:scratchsessionsid) {\n' +
|
||||
' set beresp.http.Vary = "Accept-Encoding, Accept-Language";\n' +
|
||||
' unset beresp.http.set-cookie;\n' +
|
||||
' return(deliver);\n' +
|
||||
' } else {\n' +
|
||||
' set beresp.ttl = 0s;\n' +
|
||||
' set beresp.grace = 0s;\n' +
|
||||
|
|
|
@ -65,6 +65,8 @@ tap.test('testSetTTL', function (t) {
|
|||
'if (itsactuallyttyl) {\n' +
|
||||
' if (req.url ~ "^/projects/" && !req.http.Cookie:scratchsessionsid) {\n' +
|
||||
' set beresp.http.Vary = "Accept-Encoding, Accept-Language";\n' +
|
||||
' unset beresp.http.set-cookie;\n' +
|
||||
' return(deliver);\n' +
|
||||
' } else {\n' +
|
||||
' set beresp.ttl = 0s;\n' +
|
||||
' set beresp.grace = 0s;\n' +
|
||||
|
|
Loading…
Reference in a new issue