mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-05-18 00:32:33 -04:00
Fix up lint errors
This commit is contained in:
parent
66edcb60a8
commit
785667691e
1 changed files with 3 additions and 7 deletions
|
@ -42,10 +42,6 @@ async.auto({
|
||||||
// on any of those route conditions.
|
// on any of those route conditions.
|
||||||
var notPassStatement = fastlyConfig.getAppRouteCondition('../build/*', routes, extraAppRoutes, __dirname);
|
var notPassStatement = fastlyConfig.getAppRouteCondition('../build/*', routes, extraAppRoutes, __dirname);
|
||||||
|
|
||||||
// For all the routes in routes.json, construct a varnish-style regex that matches
|
|
||||||
// only if NONE of those routes are matched.
|
|
||||||
var passStatement = fastlyConfig.negateConditionStatement(notPassStatement);
|
|
||||||
|
|
||||||
// For a non-pass condition, point backend at s3
|
// For a non-pass condition, point backend at s3
|
||||||
var recvCondition = '' +
|
var recvCondition = '' +
|
||||||
'if (' + notPassStatement + ') {\n' +
|
'if (' + notPassStatement + ') {\n' +
|
||||||
|
@ -63,13 +59,13 @@ async.auto({
|
||||||
' }\n' +
|
' }\n' +
|
||||||
' set req.grace = 60s;\n' +
|
' set req.grace = 60s;\n' +
|
||||||
' if (req.http.Cookie:scratchlanguage) {\n' +
|
' if (req.http.Cookie:scratchlanguage) {\n' +
|
||||||
' set req.http.Accept-Language = req.http.Cookie:scratchlanguage;\n' +
|
' set req.http.Accept-Language = req.http.Cookie:scratchlanguage;\n' +
|
||||||
' } else {\n' +
|
' } else {\n' +
|
||||||
' set req.http.Accept-Language = accept.language_lookup("' +
|
' set req.http.Accept-Language = accept.language_lookup("' +
|
||||||
Object.keys(languages).join(':') + '", ' +
|
Object.keys(languages).join(':') + '", ' +
|
||||||
'"en", ' +
|
'"en", ' +
|
||||||
'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:scratchsessionid) {\n' +
|
||||||
' set req.http.Cookie = req.http.Cookie:scratchlanguage;\n' +
|
' set req.http.Cookie = req.http.Cookie:scratchlanguage;\n' +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue