diff --git a/centreon/plugins/http.pm b/centreon/plugins/http.pm index e16c80fee..35af3e64f 100644 --- a/centreon/plugins/http.pm +++ b/centreon/plugins/http.pm @@ -155,7 +155,11 @@ sub set_proxy { error_msg => "Cannot load module 'HTTP::ProxyPAC'."); my $pac; eval { - $pac = HTTP::ProxyPAC->new($options{request}->{proxypac}); + if ($options{request}->{proxypac} =~ /^(http|https):\/\//) { + $pac = HTTP::ProxyPAC->new(URI->new($options{request}->{proxypac})); + } else { + $pac = HTTP::ProxyPAC->new($options{request}->{proxypac}); + } }; if ($@) { $self->{output}->add_option_msg(short_msg => 'issue to load proxypac: ' . $@);