Added verify=False to requests calls to ignore self signed SSL certificate

This commit is contained in:
Yaroslava Lukoyanova 2023-07-07 16:41:59 +03:00
parent 3050ccc9fa
commit 14c85e0a9e

View file

@ -49,7 +49,7 @@ def get_via_http_gate(
else: else:
request = f"{endpoint}{request_path}" request = f"{endpoint}{request_path}"
resp = requests.get(request, stream=True, timeout=timeout) resp = requests.get(request, stream=True, timeout=timeout, verify=False)
if not resp.ok: if not resp.ok:
raise Exception( raise Exception(
@ -77,7 +77,7 @@ def get_via_zip_http_gate(cid: str, prefix: str, endpoint: str, timeout: Optiona
endpoint: http gate endpoint endpoint: http gate endpoint
""" """
request = f"{endpoint}/zip/{cid}/{prefix}" request = f"{endpoint}/zip/{cid}/{prefix}"
resp = requests.get(request, stream=True, timeout=timeout) resp = requests.get(request, stream=True, timeout=timeout, verify=False)
if not resp.ok: if not resp.ok:
raise Exception( raise Exception(
@ -123,7 +123,7 @@ def get_via_http_gate_by_attribute(
else: else:
request = f"{endpoint}{request_path}" request = f"{endpoint}{request_path}"
resp = requests.get(request, stream=True, timeout=timeout) resp = requests.get(request, stream=True, timeout=timeout, verify=False)
if not resp.ok: if not resp.ok:
raise Exception( raise Exception(
@ -156,7 +156,7 @@ def upload_via_http_gate(
request = f"{endpoint}/upload/{cid}" request = f"{endpoint}/upload/{cid}"
files = {"upload_file": open(path, "rb")} files = {"upload_file": open(path, "rb")}
body = {"filename": path} body = {"filename": path}
resp = requests.post(request, files=files, data=body, headers=headers, timeout=timeout) resp = requests.post(request, files=files, data=body, headers=headers, timeout=timeout, verify=False)
if not resp.ok: if not resp.ok:
raise Exception( raise Exception(