diff --git a/server.py b/server.py index 97fcded..fe78904 100644 --- a/server.py +++ b/server.py @@ -40,7 +40,9 @@ def loadcert(): 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") - return redirect("/") + resp = make_response("Success!") + resp.set_cookie('certname',random_name) + return resp else: return "Both files must be a .pem file, you might want to generate a certificate via the home page." else: @@ -87,6 +89,7 @@ def relay(): print(request.headers.get('User-Agent')) url = request.args.get('gemini') queries = request.args.get('query') + certfile = request.cookies.get('certname') if url == None: return redirect("/") code = "