Skip to content

Commit

Permalink
Cleaner to set Cache-Control: private
Browse files Browse the repository at this point in the history
  • Loading branch information
ranguard committed Feb 22, 2017
1 parent 3029017 commit 1be21de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 0 additions & 4 deletions lib/MetaCPAN/Web/Controller/Account.pm
Expand Up @@ -9,10 +9,6 @@ BEGIN { extends 'MetaCPAN::Web::Controller' }
sub auto : Private {
my ( $self, $c ) = @_;

# Keep everything here as specific to the user
# this is for proxies
$c->res->header( Vary => 'Cookie' );

$c->cdn_never_cache(1);

if ( my $token = $c->token ) {
Expand Down
5 changes: 3 additions & 2 deletions t/controller/account.t
Expand Up @@ -36,8 +36,9 @@ test_psgi app, sub {
'GET /account/profile without token'
);
is( $res->code, 403, '... and the user cannot get in' );
is( $res->header('Vary'),
'Cookie', '... and the Vary header for proxies is there' );
is( $res->header('Cache-Control'),
'private',
'... and the private Cache-Control header for proxies is there' );
is( $authenticate_args, undef,
'... and we did not try to authenticate' );

Expand Down

0 comments on commit 1be21de

Please sign in to comment.