mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-05-17 16:21:41 -04:00
Fix typos and correct cookie
scratchsessionsid not scratchsessionid Cookie needs key added for assigned value of scratchlanguage
This commit is contained in:
parent
91b3feb0b1
commit
1083a7a79f
3 changed files with 4 additions and 4 deletions
|
@ -67,8 +67,8 @@ async.auto({
|
||||||
'std.tolower(req.http.Accept-Language)' +
|
'std.tolower(req.http.Accept-Language)' +
|
||||||
');\n' +
|
');\n' +
|
||||||
' }\n' +
|
' }\n' +
|
||||||
' if (req.url ~ "^/projects/" && !req.http.Cookie:scratchsessionid) {\n' +
|
' if (req.url ~ "^/projects/" && !req.http.Cookie:scratchsessionsid) {\n' +
|
||||||
' set req.http.Cookie = req.http.Cookie:scratchlanguage;\n' +
|
' set req.http.Cookie = "scratchlanguage=" req.http.Cookie:scratchlanguage;\n' +
|
||||||
' } else {\n' +
|
' } else {\n' +
|
||||||
' return(pass);\n' +
|
' return(pass);\n' +
|
||||||
' }\n' +
|
' }\n' +
|
||||||
|
|
|
@ -93,7 +93,7 @@ var FastlyConfigMethods = {
|
||||||
setResponseTTL: function (condition) {
|
setResponseTTL: function (condition) {
|
||||||
return '' +
|
return '' +
|
||||||
'if (' + condition + ') {\n' +
|
'if (' + condition + ') {\n' +
|
||||||
' if (req.url ~ "^/projects/" && !req.http.Cookie:scratchsessionid) {\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' +
|
||||||
' } else {\n' +
|
' } else {\n' +
|
||||||
' set beresp.ttl = 0s;\n' +
|
' set beresp.ttl = 0s;\n' +
|
||||||
|
|
|
@ -63,7 +63,7 @@ tap.test('testSetTTL', function (t) {
|
||||||
var ttl = fastlyConfig.setResponseTTL('itsactuallyttyl');
|
var ttl = fastlyConfig.setResponseTTL('itsactuallyttyl');
|
||||||
t.equal(ttl, '' +
|
t.equal(ttl, '' +
|
||||||
'if (itsactuallyttyl) {\n' +
|
'if (itsactuallyttyl) {\n' +
|
||||||
' if (req.url ~ "^/projects/" && !req.http.Cookie:scratchsessionid) {\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' +
|
||||||
' } else {\n' +
|
' } else {\n' +
|
||||||
' set beresp.ttl = 0s;\n' +
|
' set beresp.ttl = 0s;\n' +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue