diff --git a/app.py b/app.py index 04c09f119dc2eb35674d31e8e8e03ff113425675..9f7579c3970fcc07dbe64c856fc142a1c2a76a8c 100644 --- a/app.py +++ b/app.py @@ -13,6 +13,8 @@ def create_app(test_config=None): app.config.from_pyfile('config.py', silent=True) else: app.config.from_mapping(test_config) + # oauthlib enforces the OAuth2.0 requirement to use HTTPS, when this is not set + os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1' # That behaviour sucks, so disable it @app.route("/auth") def auth(): @@ -87,7 +89,5 @@ a valid redirect_uri for the client_id. return app if __name__ == '__main__': - # oauthlib enforces the OAuth2.0 requirement to use HTTPS, when this is not set - os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1' # Don't do that in production! testapp = create_app() testapp.run(debug=True, host='localhost', port=5002)