Set env_proxy=1 to LLNG::UserAgent (#2715)

2715
Yadd 4 years ago
parent 5b2e9ccd64
commit 581679ad6b
  1. 5
      lemonldap-ng-common/lib/Lemonldap/NG/Common/UserAgent.pm
  2. 1
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/GitHub.pm
  3. 1
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/LinkedIn.pm
  4. 1
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Twitter.pm
  5. 1
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/CAS.pm
  6. 1
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenIDConnect.pm
  7. 1
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/SAML.pm
  8. 1
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckDevOps.pm
  9. 1
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CrowdSec.pm

@ -7,11 +7,12 @@ use Lemonldap::NG::Common;
our $VERSION = '2.18.0';
sub new {
my ( $class, $conf ) = @_;
my ( $class, $conf, $noproxy ) = @_;
my $opts = $conf->{lwpOpts} || {};
my $agent = "LemonLDAP-NG/" . $Lemonldap::NG::Common::VERSION . " ";
$opts->{agent} ||= $agent;
$opts->{ssl_opts} = $conf->{lwpSslOpts} if ( $conf->{lwpSslOpts} );
$opts->{ssl_opts} = $conf->{lwpSslOpts} if ( $conf->{lwpSslOpts} );
$opts->{env_proxy} = !$noproxy;
my $ua = LWP::UserAgent->new(%$opts);
push @{ $ua->requests_redirectable }, 'POST';
return $ua;

@ -22,7 +22,6 @@ has ua => (
# TODO : LWP options to use a proxy for example
my $ua = Lemonldap::NG::Common::UserAgent->new( $_[0]->{conf} );
$ua->env_proxy();
return $ua;
}
);

@ -22,7 +22,6 @@ has ua => (
# TODO : LWP options to use a proxy for example
my $ua = Lemonldap::NG::Common::UserAgent->new( $_[0]->{conf} );
$ua->env_proxy();
return $ua;
}
);

@ -47,7 +47,6 @@ has ua => (
# TODO : LWP options to use a proxy for example
my $ua = Lemonldap::NG::Common::UserAgent->new( $_[0]->{conf} );
$ua->env_proxy();
return $ua;
}
);

@ -21,7 +21,6 @@ has ua => (
# TODO : LWP options to use a proxy for example
my $ua = Lemonldap::NG::Common::UserAgent->new( $_[0]->{conf} );
$ua->env_proxy();
return $ua;
}
);

@ -101,7 +101,6 @@ has ua => (
lazy => 1,
builder => sub {
my $ua = Lemonldap::NG::Common::UserAgent->new( $_[0]->{conf} );
$ua->env_proxy();
return $ua;
}
);

@ -46,7 +46,6 @@ has ua => (
# TODO : LWP options to use a proxy for example
my $ua = Lemonldap::NG::Common::UserAgent->new( $_[0]->{conf} );
$ua->env_proxy();
return $ua;
}
);

@ -41,7 +41,6 @@ has ua => (
lazy => 1,
builder => sub {
my $ua = Lemonldap::NG::Common::UserAgent->new( $_[0]->{conf} );
$ua->env_proxy();
return $ua;
}
);

@ -24,7 +24,6 @@ has ua => (
# TODO : LWP options to use a proxy for example
my $ua = Lemonldap::NG::Common::UserAgent->new( $_[0]->{conf} );
$ua->env_proxy();
return $ua;
}
);

Loading…
Cancel
Save