summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Quantum
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-06-21 20:41:22 +0200
committerDylan William Hardison <dylan@hardison.net>2018-06-28 22:41:59 +0200
commit0245042a5337d07748ba4b48c7c56a6fa91bbfbe (patch)
tree6d673c7c6f9eebd49e9c7bc40e713a9b37e326fc /Bugzilla/Quantum
parent11037be43cd0d059f2c66ba6f3e6fd9bdc5a455f (diff)
downloadbugzilla-0245042a5337d07748ba4b48c7c56a6fa91bbfbe.tar.gz
bugzilla-0245042a5337d07748ba4b48c7c56a6fa91bbfbe.tar.xz
optimize the /bmo/ path fix to not impact runtime performance.
Diffstat (limited to 'Bugzilla/Quantum')
-rw-r--r--Bugzilla/Quantum/Plugin/Glue.pm17
1 files changed, 8 insertions, 9 deletions
diff --git a/Bugzilla/Quantum/Plugin/Glue.pm b/Bugzilla/Quantum/Plugin/Glue.pm
index e1c78f07b..112514b63 100644
--- a/Bugzilla/Quantum/Plugin/Glue.pm
+++ b/Bugzilla/Quantum/Plugin/Glue.pm
@@ -6,6 +6,7 @@
# defined by the Mozilla Public License, v. 2.0.
package Bugzilla::Quantum::Plugin::Glue;
+use 5.10.1;
use Mojo::Base 'Mojolicious::Plugin';
use Try::Tiny;
@@ -52,18 +53,16 @@ sub register {
}
);
- $app->hook(
- around_dispatch => sub {
- my ($next, $c) = @_;
-
- if ($D{HTTPD_IN_SUBDIR}) {
+ if ($D{HTTPD_IN_SUBDIR}) {
+ $app->hook(
+ before_dispatch => sub {
+ my ($c) = @_;
my $path = $c->req->url->path;
$path =~ s{^/bmo}{}s;
$c->req->url->path($path);
- }
- $next->();
- }
- );
+ }
+ );
+ }
Bugzilla::Extension->load_all();
if ($app->mode ne 'development') {