]> iEval git - gruntmaster-page.git/commitdiff
Merge branch 'master' into newmc
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 6 Feb 2015 12:09:01 +0000 (14:09 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 6 Feb 2015 12:09:01 +0000 (14:09 +0200)
lib/Plack/App/Gruntmaster.pm

index 45cdfd1c5107e7babaad66a51a1f0a4885a5d406..f091892c75364acab62bec77a11defab31818a61 100644 (file)
@@ -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]]
This page took 0.019407 seconds and 4 git commands to generate.