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/Root.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Root.pm b/perllib/FixMyStreet/App/Controller/Root.pm
index 16f4aa491..88f480137 100644
--- a/perllib/FixMyStreet/App/Controller/Root.pm
+++ b/perllib/FixMyStreet/App/Controller/Root.pm
@@ -82,6 +82,13 @@ Display a 404 (not found) or 410 (gone) page. Pass in an optional error message
sub page_error_404_not_found : Private {
my ( $self, $c, $error_msg ) = @_;
+
+ # Try getting static content that might be given under an admin proxy.
+ # First the special generated JavaScript file
+ $c->go('/js/translation_strings', [ $1 ], []) if $c->req->path =~ m{^admin/js/translation_strings\.(.*?)\.js$};
+ # Then a generic static file
+ $c->serve_static_file("web/$1") && return if $c->req->path =~ m{^admin/(.*)};
+
$c->stash->{template} = 'errors/page_error_404_not_found.html';
$c->stash->{error_msg} = $error_msg;
$c->response->status(404);