From 80d9a6a4002e80e096eb738c12af1863d25cc9ad Mon Sep 17 00:00:00 2001 From: Son NK Date: Sun, 7 Jul 2019 23:25:58 +0200 Subject: [PATCH] set OAUTHLIB_INSECURE_TRANSPORT=1 --- server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index efe0fb2e..87c2813d 100644 --- a/server.py +++ b/server.py @@ -48,6 +48,9 @@ if ENABLE_SENTRY: integrations=[FlaskIntegration()], ) +# the app is served behin nginx which uses http and not https +os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1" + def create_app() -> Flask: app = Flask(__name__) @@ -274,8 +277,6 @@ if __name__ == "__main__": # enable to print all queries generated by sqlalchemy # app.config["SQLALCHEMY_ECHO"] = True - os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1" - if ENV == "local": LOG.d("reset db, add fake data") with app.app_context():