I am trying to serve a Flask application over HTTPS using the flask
command. I can do this using app.run
by passing the ssl_context
ar
I would personally use something like ngrok to create secure tunnels to localhost. Like davidism stated the dev server isn't meant for production but if you want see how your app behaves and/or your app requires SSL (like FlaskAsk apps for example) ngrok is the probably the easiest way.
This will be available when Flask 1.0 is released.
flask run --cert dev.crt --key dev.key
Until then, use app.run
if you really need this. Keep in mind that the dev server is not meant for production and should typically not be accessible publicly, so SSL shouldn't be as big a concern.