Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No TLS listener with flask run #2612

Closed
snobu opened this issue Jan 30, 2018 · 3 comments
Closed

No TLS listener with flask run #2612

snobu opened this issue Jan 30, 2018 · 3 comments

Comments

@snobu
Copy link

snobu commented Jan 30, 2018

Is flask run supposed to spin up a TLS listener if the app is configured with TLS?

Take this app.py:

if __name__ == "__main__":
    app.run(ssl_context=('cert.pem', 'key.pem'))
  • If i run python app.py i get the expected Listening on https://... and all is well - note the https.
  • If i run flask run i get an HTTP listener, Listening on http://.... No TLS.

Is this expected behaviour? May i suggest mentioning this somewhere in the quickstart? - http://flask.pocoo.org/docs/0.12/quickstart/

Would be great if someone would lay out the difference between the two invocations.

Ref:
https://stackoverflow.com/questions/48518584/

@snobu snobu changed the title TLS listener with flask run? No TLS listener with flask run Jan 30, 2018
@davidism
Copy link
Member

davidism commented Jan 30, 2018

Duplicate of #2606. And the SO question is a duplicate of https://stackoverflow.com/q/48467835/400617, which wasn't apparent when I saw it earlier today because they didn't say they were using the flask command.

@davidism
Copy link
Member

Surprising that it's come up twice so recently after the issue and PR were made. Also, sorry, thought the question was yours originally, but you were the one hunting down an MCVE from them. Thanks for the help. :-)

@snobu
Copy link
Author

snobu commented Jan 30, 2018

No worries, glad this is no longer an issue with Flask 1.0+. Can one already get that from pip or there's an ETA?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants