Skip to content

Do not encourage Flask.run in production #16

Closed
@davidism

Description

@davidism

I'm not entirely clear if this is even meant for deployed applications, since the docs don't get into that. The Werkzeug dev server is not guaranteed to be efficient, stable, or secure. Your guide should mention that Dash.run_server should only be used during development.

Another option would be to use Gunicorn in Dash.run_server instead of Flask.run, and not make your users decide.

If you don't want to write your own deploy docs, you can point at http://flask.pocoo.org/docs/dev/deploying/ and mention that the app instance is Dash.server. Since they have the option to serve static files locally, you should also mention serving them with the web server instead of Flask in that case.

Additionally, it is dangerous to enable debug mode by default, since that enables the interactive debugger. Since that's not mentioned in your docs, users may inadvertently expose themselves by calling run_server and binding to the outside world. Your docs already do run_server(debug=True) in most places, so simply changing the default would be safer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions