mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
fixed proton bridge self signed certs with skip verification var
This commit is contained in:
1 parent
e681b74533
commit
1624988727
1 file changed
+2
-3
@@ -11,8 +11,7 @@ class InsecureEmailBackend(EmailBackend):
|
||||
@property
|
||||
def ssl_context(self):
|
||||
if getattr(settings, 'EMAIL_SKIP_CERT_VERIFICATION', False):
|
||||
context = ssl.create_default_context()
|
||||
context.check_hostname = False
|
||||
context.verify_mode = ssl.CERT_NONE
|
||||
# The most robust way to bypass verification for self-signed certs
|
||||
context = ssl._create_unverified_context()
|
||||
return context
|
||||
return super().ssl_context
|
||||
Reference in new issue
Block a user