aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r--perllib/FixMyStreet/App/Controller/Offline.pm29
-rw-r--r--perllib/FixMyStreet/App/Controller/Root.pm5
2 files changed, 1 insertions, 33 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Offline.pm b/perllib/FixMyStreet/App/Controller/Offline.pm
index d8b9180dd..57cbe201c 100644
--- a/perllib/FixMyStreet/App/Controller/Offline.pm
+++ b/perllib/FixMyStreet/App/Controller/Offline.pm
@@ -14,7 +14,7 @@ FixMyStreet::App::Controller::Offline - Catalyst Controller
=head1 DESCRIPTION
-Offline pages Catalyst Controller - service worker and appcache.
+Offline pages Catalyst Controller - service worker handling
=head1 METHODS
@@ -82,33 +82,6 @@ sub manifest: Path("/.well-known/manifest.webmanifest") {
$c->res->body($json);
}
-# Old appcache functions below
-
-sub have_appcache : Private {
- my ($self, $c) = @_;
- return $c->user_exists && $c->user->has_body_permission_to('planned_reports')
- && !($c->user->is_superuser && FixMyStreet->staging_flag('enable_appcache', 0));
-}
-
-sub appcache_manifest : Path("/offline/appcache.manifest") {
- my ($self, $c) = @_;
- unless ($c->forward('have_appcache')) {
- $c->response->status(404);
- $c->response->body('NOT FOUND');
- }
- $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} && !$c->req->query_keywords;
- unless ($c->forward('have_appcache')) {
- $c->response->status(404);
- $c->response->body('NOT FOUND');
- }
-}
-
__PACKAGE__->meta->make_immutable;
1;
diff --git a/perllib/FixMyStreet/App/Controller/Root.pm b/perllib/FixMyStreet/App/Controller/Root.pm
index fb6d063be..caaa260ff 100644
--- a/perllib/FixMyStreet/App/Controller/Root.pm
+++ b/perllib/FixMyStreet/App/Controller/Root.pm
@@ -159,11 +159,6 @@ sub check_login_required : Private {
}x;
return if $c->request->path =~ $whitelist;
- # Blacklisted URLs immediately 404
- # This is primarily to work around a Safari bug where the appcache
- # URL is requested in an infinite loop if it returns a 302 redirect.
- $c->detach('/page_error_404_not_found', []) if $c->request->path =~ /^offline/;
-
$c->detach( '/auth/redirect' );
}