Run Flask dev server over HTTPS using CLI

后端 未结 2 1024
暗喜
暗喜 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条回答
  •  终归单人心
    2021-01-12 11:35

    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.

提交回复
热议问题