gpt4 book ai didi

django - 在 Django 中禁用 SSL 验证 Sentry Raven

转载 作者:太空宇宙 更新时间:2023-11-03 12:56:03 25 4
gpt4 key购买 nike

我想添加一个具有自签名证书的测试 Sentry 实例。

应用有默认的RAVEN_CONFIG

RAVEN_CONFIG = {
'dsn': 'https://xxxx@sentry.tst2.server.com/2',
# If you are using git, you can also automatically configure the
# release based on the git info.
'release': raven.fetch_git_sha(os.path.dirname(os.pardir)),
}

我尝试将 'verify_ssl':0 添加到配置字典中,但无济于事。

这是我遇到的错误:

Traceback (most recent call last):
File "/opt/apps/.virtualenvs/palantir/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 162, in send_sync
super(ThreadedHTTPTransport, self).send(data, headers)
File "/opt/apps/.virtualenvs/palantir/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
ca_certs=self.ca_certs,
File "/opt/apps/.virtualenvs/palantir/local/lib/python2.7/site-packages/raven/utils/http.py", line 62, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/opt/apps/.virtualenvs/palantir/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
return self.do_open(ValidHTTPSConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)>

最佳答案

您可以尝试添加 verify_ssl=0 to your DSN 吗?如文档所示:

https://xxxx@sentry.tst2.server.com/2?verify_ssl=0

关于django - 在 Django 中禁用 SSL 验证 Sentry Raven,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46608982/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com