Skip to content

Instantly share code, notes, and snippets.

@dklawren
Created August 8, 2018 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dklawren/4bfd5254a0848d4264d261a459a8d6be to your computer and use it in GitHub Desktop.
Save dklawren/4bfd5254a0848d4264d261a459a8d6be to your computer and use it in GitHub Desktop.
diff --git a/Bugzilla/Quantum.pm b/Bugzilla/Quantum.pm
index 03dfcf0d0..d0a1b9df9 100644
--- a/Bugzilla/Quantum.pm
+++ b/Bugzilla/Quantum.pm
@@ -112,6 +112,15 @@ sub startup {
$ses_auth->any('/index.cgi')->to('SES#main');
Bugzilla::Hook::process( 'app_startup', { app => $self } );
+
+ $r->any(
+ '/(*)' => sub {
+ my $c = shift;
+ $c->res->code(404);
+ $c->res->message('Not Found');
+ $c->reply->file($c->app->home->child('errors/404.html'));
+ }
+ );
}
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment