]> git.zerfleddert.de Git - rsbs2/commitdiff
supermicro-kvm: handle redirects to https master
authorMichael Gernoth <michael@gernoth.net>
Fri, 30 Apr 2021 10:05:43 +0000 (12:05 +0200)
committerMichael Gernoth <michael@gernoth.net>
Fri, 30 Apr 2021 10:05:43 +0000 (12:05 +0200)
supermicro-kvm.pl

index 93e91a062b9c9e21df5ddbc278f8c193338f787a..3339289eafc9fce7207a05e5471062b577b7a7d8 100755 (executable)
@@ -2,12 +2,16 @@
 
 use LWP::UserAgent;
 use LWP::ConnCache;
 
 use LWP::UserAgent;
 use LWP::ConnCache;
+use IO::Socket::SSL;
 use XML::Simple;
 use Data::Dumper;
 use File::Temp;
 
 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');
 $ua->default_header('Referer' => 'http://localhost');
+push @{ $ua->requests_redirectable }, 'POST';
 
 sub login {
        my $url = shift;
 
 sub login {
        my $url = shift;
Impressum, Datenschutz