X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FPlack%2FApp%2FGruntmaster.pm;h=f091892c75364acab62bec77a11defab31818a61;hb=29de778ba60e4c2b499b417e0dfa4317d54c5d57;hp=45cdfd1c5107e7babaad66a51a1f0a4885a5d406;hpb=ea1d4cca6fce7e8a211bf53ad928aa9a7d3c0d10;p=gruntmaster-page.git diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 45cdfd1..f091892 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -137,6 +137,7 @@ sub dispatch_request{ my ($r) = @_; return $r if ref $r ne 'Plack::App::Gruntmaster::Response'; my @hdrs = ('X-Forever' => 1, 'Cache-Control' => "$privacy, max-age=$r->{maxage}"); + push @hdrs, Vary => 'Authorization' if $privacy eq 'private'; return [200, ['Content-Type' => 'application/json', @hdrs], [encode_json $r->{params}]] if $format eq 'json'; my $ret = render $r->{template}, 'en', title => $r->{title}, %{$r->{params}}; [200, ['Content-Type' => 'text/html', @hdrs], [encode 'UTF-8', $ret]]