From 6b0cb2c7ebc488bf2f22ddec45bf64d8c2b0593f Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Sat, 3 Mar 2018 15:25:25 -0500 Subject: add ses bounce handler --- app.psgi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 ) { -- cgit v1.2.3-24-g4f1b