Skip to content

Commit 2c533f2

Browse files
committed
Merge branch 'staging' of github.com:code-dot-org/code-dot-org into staging
2 parents 60080dd + 1832515 commit 2c533f2

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

chef/cookbooks/cdo-varnish/templates/default/default.vcl.erb

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,64 @@ end
341341
req.http.host == "<%= canonical_hostname('studio.code.org') %>" ||
342342
req.http.host == "code-dot-org.cartoonnetworkarabic.com")
343343
{
344+
<% if false %>
345+
if(req.http.Cookie ~ "language_=en" || !(req.http.Cookie ~ "language_"))
346+
{
347+
if(req.url == "/s/frozen")
348+
{
349+
error 751 "http://static.studio.code.org/";
350+
}
351+
<% { '/s/frozen/reset'=>'http://static.studio.code.org/',
352+
'/s/frozen/stage/1/puzzle/1'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=1',
353+
'/s/frozen/stage/1/puzzle/2'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=2',
354+
'/s/frozen/stage/1/puzzle/3'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=3',
355+
'/s/frozen/stage/1/puzzle/4'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=4',
356+
'/s/frozen/stage/1/puzzle/5'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=5',
357+
'/s/frozen/stage/1/puzzle/6'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=6',
358+
'/s/frozen/stage/1/puzzle/7'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=7',
359+
'/s/frozen/stage/1/puzzle/8'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=8',
360+
'/s/frozen/stage/1/puzzle/9'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=9',
361+
'/s/frozen/stage/1/puzzle/10'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=10',
362+
'/s/frozen/stage/1/puzzle/11'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=11',
363+
'/s/frozen/stage/1/puzzle/12'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=12',
364+
'/s/frozen/stage/1/puzzle/13'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=13',
365+
'/s/frozen/stage/1/puzzle/14'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=14',
366+
'/s/frozen/stage/1/puzzle/15'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=15',
367+
'/s/frozen/stage/1/puzzle/16'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=16',
368+
'/s/frozen/stage/1/puzzle/17'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=17',
369+
'/s/frozen/stage/1/puzzle/18'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=18',
370+
'/s/frozen/stage/1/puzzle/19'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=19',
371+
'/s/frozen/stage/1/puzzle/20'=>'http://static.studio.code.org/?s=frozen&stage=1&puzzle=20',
372+
'/hoc/reset'=>'http://static-hoc.studio.code.org/?s=hoc',
373+
'/hoc/1'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=1',
374+
'/hoc/2'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=2',
375+
'/hoc/3'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=3',
376+
'/hoc/4'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=4',
377+
'/hoc/5'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=5',
378+
'/hoc/6'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=6',
379+
'/hoc/7'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=7',
380+
'/hoc/8'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=8',
381+
'/hoc/9'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=9',
382+
'/hoc/10'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=10',
383+
'/hoc/11'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=11',
384+
'/hoc/12'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=12',
385+
'/hoc/13'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=13',
386+
'/hoc/14'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=14',
387+
'/hoc/15'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=15',
388+
'/hoc/16'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=16',
389+
'/hoc/17'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=17',
390+
'/hoc/18'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=18',
391+
'/hoc/19'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=19',
392+
'/hoc/20'=>'http://static-hoc.studio.code.org/?s=hoc&stage=1&puzzle=20',
393+
}.each_pair do |src, dest| %>
394+
else if(req.url == "<%= src %>")
395+
{
396+
error 751 "<%= dest %>";
397+
}
398+
<% end %>
399+
}
400+
<% end %>
401+
344402
if (req.url ~ "^/v2/")
345403
{
346404
set req.backend = default;

0 commit comments

Comments
 (0)