File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,11 @@ async def load(
176176 user_agent = context .config .HTTP_LOADER_DEFAULT_USER_AGENT
177177
178178 url = normalize_url_func (url )
179+
180+ validate_cert = context .config .HTTP_LOADER_VALIDATE_CERTS
181+ if validate_cert is not None :
182+ validate_cert = (validate_cert .lower ().strip () == "true" )
183+
179184 req = tornado .httpclient .HTTPRequest (
180185 url = url ,
181186 headers = headers ,
@@ -191,7 +196,7 @@ async def load(
191196 ca_certs = encode_fn (context .config .HTTP_LOADER_CA_CERTS ),
192197 client_key = encode_fn (context .config .HTTP_LOADER_CLIENT_KEY ),
193198 client_cert = encode_fn (context .config .HTTP_LOADER_CLIENT_CERT ),
194- validate_cert = False , # TODO: check why setting HTTP_LOADER_VALIDATE_CERTS to False does not work
199+ validate_cert = validate_cert ,
195200 prepare_curl_callback = prepare_curl_callback ,
196201 )
197202
You can’t perform that action at this time.
0 commit comments