propagate the support of the new 'accept_selfsigned_certs' option to 'lighttpd' module. #40

This commit is contained in:
Jordi Sanfeliu 2014-01-29 18:22:51 +01:00
parent 2b15427c44
commit 5a9566eb3d
1 changed files with 4 additions and 0 deletions

View File

@ -146,6 +146,10 @@ sub lighttpd_update {
foreach(my @ll = split(',', $lighttpd->{list})) { foreach(my @ll = split(',', $lighttpd->{list})) {
my $url = trim($_) . "/server-status?auto"; my $url = trim($_) . "/server-status?auto";
my $ua = LWP::UserAgent->new(timeout => 30); my $ua = LWP::UserAgent->new(timeout => 30);
$ua->ssl_opts(verify_hostname => 0)
if lc($config->{accept_selfsigned_certs}) eq "y";
my $response = $ua->request(HTTP::Request->new('GET', $url)); my $response = $ua->request(HTTP::Request->new('GET', $url));
if(!$response->is_success) { if(!$response->is_success) {