mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 07:34:35 +02:00
make proxyurl easier to set
This commit is contained in:
parent
9816f0d963
commit
e0d67937ab
@ -106,7 +106,11 @@ sub set_proxy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (defined($options{request}->{proxyurl}) && $options{request}->{proxyurl} ne '') {
|
if (defined($options{request}->{proxyurl}) && $options{request}->{proxyurl} ne '') {
|
||||||
$self->{ua}->proxy(['http', 'https'], $options{request}->{proxyurl});
|
my $proxyurl = $options{request}->{proxyurl};
|
||||||
|
if ($options{request}->{proto} eq "https" || $options{request}->{full_url} =~ /^https/) {
|
||||||
|
$proxyurl = 'connect://' . $2 if ($proxyurl =~ /^(http|https):\/\/(.*)/);
|
||||||
|
}
|
||||||
|
$self->{ua}->proxy(['http', 'https'], $proxyurl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user