X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FCSS.pm;h=a6f647a5f924846cbabb0607893158c67acc2644;hb=923655e1a9f847c21d3fdb254f58e705f4dd4da9;hp=a3e227fb7b536eb52f5000338d39d35a65104749;hpb=7dc3247307f2e86af154dc449224f22ba8923c79;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/CSS.pm b/lib/Gruntmaster/Page/CSS.pm index a3e227f..a6f647a 100644 --- a/lib/Gruntmaster/Page/CSS.pm +++ b/lib/Gruntmaster/Page/CSS.pm @@ -13,9 +13,10 @@ use CSS::Minifier::XS qw/minify/; sub generate{ my ($self, $format, $logger, $theme) = @_; debug $logger => "theme is $theme"; + return [404, ['Content-Type' => 'text/plain'], [ 'Not found' ]] unless -e "css/themes/$theme.css"; my $css = read_file "css/themes/$theme.css"; $css .= read_file $_ for ; - [200, ['Content-Type' => 'text/css', 'Cache-Control' => 'max-age=604800'], [minify $css] ] + [200, ['Content-Type' => 'text/css', 'Cache-Control' => 'public, max-age=604800'], [minify $css] ] } sub variants{ [[css => 1, 'text/css', undef, undef, undef, undef]] }