From 8f653d38cd08b9f0f5d4b6c74f32644f302e06c1 Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Wed, 29 Jan 2014 18:23:48 +0100 Subject: [PATCH] propagate the support of the new 'accept_selfsigned_certs' option to 'nginx' module. #40 --- lib/nginx.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/nginx.pm b/lib/nginx.pm index 3fd03fa..4654b38 100644 --- a/lib/nginx.pm +++ b/lib/nginx.pm @@ -145,6 +145,10 @@ sub nginx_update { my $url = "http://127.0.0.1:" . $nginx->{port} . "/nginx_status"; 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 $rrdata = "N";