Launch DevOps configuration check before fetching cookie (Fixes #2367)

Moo
Xavier Guimard 5 years ago
parent ca7107ec59
commit bdccb42196
  1. 12
      lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/DevOps.pm

@ -15,9 +15,9 @@ sub ua {
return $_ua = Lemonldap::NG::Common::UserAgent->new( $_[0]->localConfig );
}
sub grant {
my ( $class, $req, $session, $uri, $cond, $vhost ) = @_;
$vhost ||= $class->resolveAlias($req);
sub checkMaintenanceMode {
my ( $class, $req ) = @_;
my $vhost = $class->resolveAlias($req);
$class->tsv->{lastVhostUpdate} //= {};
unless (
$class->tsv->{defaultCondition}->{$vhost}
@ -28,8 +28,7 @@ sub grant {
{
$class->loadVhostConfig( $req, $vhost );
}
return $class->Lemonldap::NG::Handler::Main::grant( $req, $session, $uri,
$cond, $vhost );
return $class->Lemonldap::NG::Handler::Main::checkMaintenanceMode($req);
}
sub loadVhostConfig {
@ -37,7 +36,8 @@ sub loadVhostConfig {
my $json;
if ( $class->tsv->{useSafeJail} ) {
my $rUrl = $req->{env}->{RULES_URL}
|| ( (
|| (
(
$class->localConfig->{loopBackUrl}
|| "http://127.0.0.1:" . $req->{env}->{SERVER_PORT}
)

Loading…
Cancel
Save