Update server.py
This commit is contained in:
parent
933ef74c70
commit
6e34c499ed
1 changed files with 2 additions and 2 deletions
|
@ -38,8 +38,8 @@ def loadcert_backend():
|
|||
return "Please upload a certificate and private key."
|
||||
if allowed_file(cert.filename) and allowed_file(privkey.filename):
|
||||
random_name = ''.join(random.choice(string.ascii_lowercase+string.digits+string.ascii_uppercase) for i in range(8))
|
||||
cert.save(homefolder + "/certs/" + randomname + "-chain.pem")
|
||||
privkey.save(homefolder + "/certs/" + randomname + "-privkey.pem")
|
||||
cert.save(homefolder + "/certs/" + random_name + "-chain.pem")
|
||||
privkey.save(homefolder + "/certs/" + random_name + "-privkey.pem")
|
||||
resp = make_response("<meta http-equiv=\"refresh\" content=\"0; url=//\" />Success!")
|
||||
resp.set_cookie('certname',random_name)
|
||||
return resp
|
||||
|
|
Loading…
Add table
Reference in a new issue