Update gunicorn.conf.py

This commit is contained in:
Donald Zou 2024-12-12 18:29:11 +08:00
parent f425156cad
commit c47b0c9741

View File

@ -26,8 +26,8 @@ if os.path.exists("./ssl-tls.ini"):
sslConfig = configparser.ConfigParser()
sslConfig.read_file(open('./ssl-tls.ini', 'r'))
if sslConfig.has_section('SSL/TLS'):
cert = sslConfig.get('SSL', 'certificate_path')
pem = sslConfig.get('SSL', 'private_key_path')
cert = sslConfig.get('SSL/TLS', 'certificate_path')
pem = sslConfig.get('SSL/TLS', 'private_key_path')
if cert and pem and len(cert) > 0 and len(pem) > 0:
certfile = cert
keyfile = pem