Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sentry_sdk/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"before_breadcrumb": None,
"debug": False,
"attach_stacktrace": False,
"ca_certs": None,
}


Expand Down
9 changes: 7 additions & 2 deletions sentry_sdk/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@
from urllib import getproxies


def _make_pool(parsed_dsn, http_proxy, https_proxy):
def _make_pool(parsed_dsn, http_proxy, https_proxy, ca_certs):
proxy = https_proxy if parsed_dsn == "https" else http_proxy
if not proxy:
proxy = getproxies().get(parsed_dsn.scheme)

opts = {"num_pools": 2, "cert_reqs": "CERT_REQUIRED", "ca_certs": certifi.where()}
opts = {
"num_pools": 2,
"cert_reqs": "CERT_REQUIRED",
"ca_certs": ca_certs or certifi.where(),
}

if proxy:
return urllib3.ProxyManager(proxy, **opts)
Expand Down Expand Up @@ -89,6 +93,7 @@ def __init__(self, options):
self.parsed_dsn,
http_proxy=options["http_proxy"],
https_proxy=options["https_proxy"],
ca_certs=options["ca_certs"],
)
self._disabled_until = None
self._retry = urllib3.util.Retry()
Expand Down