Commit 9a98a0f2 authored by Dietmar Maurer's avatar Dietmar Maurer

fix API2Client - disable verify_hostname

parent 7e9387f9
...@@ -110,7 +110,7 @@ sub call { ...@@ -110,7 +110,7 @@ sub call {
if ($response->is_success) { if ($response->is_success) {
my $ct = $response->header('Content-Type'); my $ct = $response->header('Content-Type');
die "got unexpected content type" if $ct ne 'application/json'; die "got unexpected content type" if $ct !~ m|application/json|;
return from_json($response->decoded_content, {utf8 => 1, allow_nonref => 1}); return from_json($response->decoded_content, {utf8 => 1, allow_nonref => 1});
...@@ -149,6 +149,7 @@ sub new { ...@@ -149,6 +149,7 @@ sub new {
$self->{useragent} = LWP::UserAgent->new( $self->{useragent} = LWP::UserAgent->new(
cookie_jar => $self->{cookie_jar}, cookie_jar => $self->{cookie_jar},
protocols_allowed => [ 'http', 'https'], protocols_allowed => [ 'http', 'https'],
ssl_opts => { verify_hostname => 0 },
timeout => $self->{timeout}, timeout => $self->{timeout},
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment