Update server.py

This commit is contained in:
Nova Cat 2025-01-15 21:43:04 -08:00
parent 6fb311ad89
commit c9a28d9022

View file

@ -36,6 +36,7 @@ def loadcert_backend():
privkey = request.files['privkey'] privkey = request.files['privkey']
if cert.filename == '' or privkey.filename == '': if cert.filename == '' or privkey.filename == '':
return "Please upload a certificate and private key." return "Please upload a certificate and private key."
print(cert.read())
if allowed_file(cert.filename) and allowed_file(privkey.filename): if allowed_file(cert.filename) and allowed_file(privkey.filename):
for i in os.listdir(homefolder + "/certs/"): for i in os.listdir(homefolder + "/certs/"):
thisname = "-".join(i.split("-")[:-1]) thisname = "-".join(i.split("-")[:-1])