diff --git a/lib/Net/CampaignMonitor.pm b/lib/Net/CampaignMonitor.pm index 4c99445..3e20c66 100644 --- a/lib/Net/CampaignMonitor.pm +++ b/lib/Net/CampaignMonitor.pm @@ -106,6 +106,10 @@ sub create_rest_client { my $ua = LWP::UserAgent->new; $ua->agent($self->{useragent}); + if ($self->{secure}) { + $ua->ssl_opts( verify_hostname => 1 ); + } + if (exists $self->{access_token}) { $ua->default_header('Authorization' => 'Bearer '.$self->{access_token}); } elsif (exists $self->{api_key}) {