summaryrefslogtreecommitdiffstats
path: root/app.psgi
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-03-03 21:25:25 +0100
committerDylan William Hardison <dylan@hardison.net>2018-03-10 21:54:38 +0100
commit6b0cb2c7ebc488bf2f22ddec45bf64d8c2b0593f (patch)
tree2c7cf793cccd6284b6bc5a8d296dd2d5902c13f2 /app.psgi
parent6a995f2c172e4497df6683d978c7823647dcb2ed (diff)
downloadbugzilla-6b0cb2c7ebc488bf2f22ddec45bf64d8c2b0593f.tar.gz
bugzilla-6b0cb2c7ebc488bf2f22ddec45bf64d8c2b0593f.tar.xz
add ses bounce handler
Diffstat (limited to 'app.psgi')
-rw-r--r--app.psgi17
1 files changed, 17 insertions, 0 deletions
diff --git a/app.psgi b/app.psgi
index f3ce2fb64..57afc50c7 100644
--- a/app.psgi
+++ b/app.psgi
@@ -64,6 +64,21 @@ Bugzilla->preload_features();
# Force instantiation of template so Bugzilla::Template::PreloadProvider can do its magic.
Bugzilla->template;
+my $ses_index = builder {
+ my $auth_user = Bugzilla->localconfig->{ses_username};
+ my $auth_pass = Bugzilla->localconfig->{ses_password};
+ enable "Auth::Basic", authenticator => sub {
+ my ($username, $password, $env) = @_;
+ return ( $auth_user
+ && $auth_pass
+ && $username
+ && $password
+ && $username eq $auth_user
+ && $password eq $auth_pass );
+ };
+ compile_cgi("ses/index.cgi");
+};
+
my $bugzilla_app = builder {
my $static_paths = join( '|', STATIC );
@@ -82,6 +97,8 @@ my $bugzilla_app = builder {
$mount{$name} = compile_cgi($script);
}
+ $mount{'ses/index.cgi'} = $ses_index;
+
Bugzilla::Hook::process('psgi_builder', { mount => \%mount });
foreach my $name ( keys %mount ) {