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

websocket in flask + https #63

Open
sailor88128 opened this issue Sep 20, 2017 · 1 comment
Open

websocket in flask + https #63

sailor88128 opened this issue Sep 20, 2017 · 1 comment

Comments

@sailor88128
Copy link

Hi,

I want to use websocket via https (because h5 getUserMedia need the secure connect). Try the code use https in Flask as below.

app.run(gevent=100, host='192.168.2.217', debug=True, port=5000, ssl_context='adhoc')

It seems there is a conflict between websocket and https? Any body know how to solve this?

uwsgi: unrecognized option '--ssl_context' getopt_long() error

@rosensama
Copy link
Contributor

I followed this: http://uwsgi-docs.readthedocs.io/en/latest/HTTPS.html

and found this to work:

    ssl_cert = path.join(path.dirname(__file__), 'ssl.cert')
    ssl_key = path.join(path.dirname(__file__), 'ssl.key')
    app.run(https='0.0.0.0:5001,{},{}'.format(ssl_cert,ssl_key), gevent=100)`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants