From cf68e0ab876542d440ffa03b9c98f9d440294e3e Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Fri, 30 Apr 2021 12:05:43 +0200 Subject: [PATCH 1/1] supermicro-kvm: handle redirects to https --- supermicro-kvm.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/supermicro-kvm.pl b/supermicro-kvm.pl index 93e91a0..3339289 100755 --- a/supermicro-kvm.pl +++ b/supermicro-kvm.pl @@ -2,12 +2,16 @@ use LWP::UserAgent; use LWP::ConnCache; +use IO::Socket::SSL; use XML::Simple; use Data::Dumper; use File::Temp; -my $ua = LWP::UserAgent->new(cookie_jar => {}); +my $ua = LWP::UserAgent->new(cookie_jar => {}, + ssl_opts => {verify_hostname => 0, + SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE}); $ua->default_header('Referer' => 'http://localhost'); +push @{ $ua->requests_redirectable }, 'POST'; sub login { my $url = shift; -- 2.39.5