Run Flask dev server over HTTPS using CLI

后端 未结 2 1025
暗喜
暗喜 2021-01-12 10:31

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

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-12 11:25

    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.

提交回复
热议问题