my $content = read_file "a/$article.$lang";
my $title = read_file "a/$article.$lang.title";
my $html = Gruntmaster::Page::Base::header($lang, $title) . $content . Gruntmaster::Page::Base::footer($lang);
- return [200, ['Content-Type' => 'text/html', 'Content-Language' => $lang, 'Vary' => 'Accept-Language'], [$html] ]
+ return [200, ['Content-Type' => 'text/html', 'Content-Language' => $lang, 'Vary' => 'Accept-Language', 'X-Forever' => 1, 'Cache-Control' => 'max-age=300'], [$html] ]
}
}
my $word = qr,(\w+),a;
my $ct = qr,(?:\/ct/$word)?,a;
- get qr,/css/$word, => 'CSS';
- get qr,/js, => 'JS';
+ get qr,/css/$word\.css, => 'CSS';
+ get qr,/js\.js, => 'JS';
get qr,/ct/, => 'Ct';
- get qr,/ct/$word, => 'Ct::Entry';
+ get qr,/ct/$word/, => 'Ct::Entry';
get qr,/us/, => 'Us';
get qr,/us/$word, => 'Us::Entry';