aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index 0587a627a..68dbd6359 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -31,8 +31,6 @@ Show the summary page of all reports.
sub index : Path : Args(0) {
my ( $self, $c ) = @_;
- $c->response->header('Cache-Control' => 'max-age=3600');
-
# Fetch all areas of the types we're interested in
my $areas_info;
eval {
@@ -73,6 +71,9 @@ sub index : Path : Args(0) {
sprintf(_('The error was: %s'), $@);
$c->stash->{template} = 'errors/generic.html';
}
+
+ # Down here so that error pages aren't cached.
+ $c->response->header('Cache-Control' => 'max-age=3600');
}
=head2 index