1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-06-15 00:05:11 +02:00

make it optional, add a knob

This commit is contained in:
Florent Daigniere
2021-08-10 12:19:51 +02:00
parent 5e1ba9d4ff
commit c76a76c0b0
2 changed files with 7 additions and 2 deletions

View File

@ -31,7 +31,7 @@ command2 = [
]
def format_for_nginx(fullchain, output):
""" nginx doesn't need the "compat"
""" We may want to strip ISRG Root X1 out
"""
certs = []
with open(fullchain, 'r') as pem:
@ -42,7 +42,7 @@ def format_for_nginx(fullchain, output):
certs += [cert]
cert = ''
with open(output, 'w') as pem:
for cert in certs[:-1] if len(certs)>2 else certs:
for cert in certs[:-1] if len(certs)>2 and os.getenv('LETSENCRYPT_SHORTCHAIN', default="False") else certs:
pem.write(cert)
# Wait for nginx to start