},
sub (?:format~) {
- my $format = lc $_{format} // '';
+ my $format = lc ($_{format} // '');
response_filter {
my ($r) = @_;
return $r if ref $r ne 'Plack::App::Gruntmaster::Response';
- return [200, ['Content-Type' => 'application/json', 'X-Forever' => 1], [encode_json $r->{params}]] if $format eq 'json';
+ return [200, ['Content-Type' => 'application/json'], [encode_json $r->{params}]] if $format eq 'json';
my $ret = render $r->{template}, 'en', title => $r->{title}, %{$r->{params}};
[200, ['Content-Type' => 'text/html'], [encode 'UTF-8', $ret]]
},