Skip to content

Commit 0f0c0da

Browse files
author
toshke
committed
HTTPS allows insecure by default
1 parent a0fead2 commit 0f0c0da

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: handler.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import boto3
55
from time import perf_counter as pc
66
from urllib.parse import urlparse
7+
import ssl
78

89
import re
910

@@ -40,7 +41,7 @@ def __get_property(self, property_name):
4041
if property_name in self.event:
4142
return self.event[property_name]
4243
if property_name in os.environ:
43-
return os.env[property_name]
44+
return os.environ[property_name]
4445
if property_name in self.defaults:
4546
return self.defaults[property_name]
4647
return None
@@ -109,7 +110,7 @@ def execute(self):
109110
request = http.client.HTTPConnection(location, timeout=int(self.timeout))
110111

111112
if url.scheme == 'https':
112-
request = http.client.HTTPSConnection(location, timeout=int(self.timeout))
113+
request = http.client.HTTPSConnection(location, timeout=int(self.timeout), context=ssl._create_unverified_context())
113114

114115
if 'HTTP_DEBUG' in os.environ and os.environ['HTTP_DEBUG'] == '1':
115116
request.set_debuglevel(1)

0 commit comments

Comments
 (0)