aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Offline.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-12-16 12:52:16 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-12-16 12:52:16 +0000
commit12bbcc4bfa64cfb9677b9317929916d24dd472fb (patch)
tree20085c955101175da958ca6b3a481f68b87fc09d /perllib/FixMyStreet/App/Controller/Offline.pm
parent38490f6ea18064c232bda6ebfbaee052bd8f0951 (diff)
parentadf07727ab14468c262759a21dedc1ac84cd32c8 (diff)
Merge branch 'issues/forcouncils/20-offline-inspecting'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Offline.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Offline.pm32
1 files changed, 32 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Offline.pm b/perllib/FixMyStreet/App/Controller/Offline.pm
new file mode 100644
index 000000000..9acb33f7e
--- /dev/null
+++ b/perllib/FixMyStreet/App/Controller/Offline.pm
@@ -0,0 +1,32 @@
+package FixMyStreet::App::Controller::Offline;
+use Moose;
+use namespace::autoclean;
+
+BEGIN { extends 'Catalyst::Controller'; }
+
+=head1 NAME
+
+FixMyStreet::App::Controller::Offline - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Offline pages Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+sub manifest : Path("/offline/appcache.manifest") {
+ my ($self, $c) = @_;
+ $c->res->content_type('text/cache-manifest; charset=utf-8');
+ $c->res->header(Cache_Control => 'no-cache, no-store');
+}
+
+sub appcache : Path("/offline/appcache") {
+ my ($self, $c) = @_;
+ $c->detach('/page_error_404_not_found', []) if keys %{$c->req->params};
+}
+
+__PACKAGE__->meta->make_immutable;
+
+1;