Forums

SSL letsencrypt in Flaks

Hi, my website is not using https yet, I have the certificates and tried the following code:

from OpenSSL import SSL
context = SSL.Context(SSL.SSLv23_METHOD)
context.use_privatekey_file('/home/ahuevo/letsencrypt/www.paulahuevo.com/privkey.pem')
context.use_certificate_chain_file('/home/ahuevo/letsencrypt/www.paulahuevo.com/fullchain.pem')
context.use_certificate_file('/home/ahuevo/letsencrypt/www.paulahuevo.com/cert.pem')

app = Flask(__name__)
app.config["SSL_CONTEXT"] = context

EDIT: I got an answer from Glenn via Email thank you very much. I just did not put https in the beginning of the URL. This can be closed.