Skip to content
Snippets Groups Projects
Commit f09c5b5e authored by Julian's avatar Julian
Browse files

Disabled exceptions for non-HTTPS

parent edb71f26
Branches
Tags
No related merge requests found
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment