From 3af726dfc31ca9fc7757efcc39f60db6d3f4bb0c Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Thu, 25 Aug 2022 14:50:01 +0200 Subject: [PATCH] Set `verify_SSL=>1` by default for HTTP::Tiny in Plack::LWPish HTTP::Tiny doesn't verify TLS/SSL certificates by default. This PR sets that flag for the default user agent so HTTPS certificates are verified like LWP does. --- lib/Plack/LWPish.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Plack/LWPish.pm b/lib/Plack/LWPish.pm index 8c3af2f59..c162837e1 100644 --- a/lib/Plack/LWPish.pm +++ b/lib/Plack/LWPish.pm @@ -8,7 +8,7 @@ use Hash::MultiValue; sub new { my $class = shift; my $self = bless {}, $class; - $self->{http} = @_ == 1 ? $_[0] : HTTP::Tiny->new(@_); + $self->{http} = @_ == 1 ? $_[0] : HTTP::Tiny->new(verify_SSL => 1, @_); $self; }