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():