Merge pull request #352 from Learnware-LAMDA/fix_missing_header

fix(backend): fix 'missing authorization header' error
This commit is contained in:
zouxiaochuan 2024-02-07 19:23:14 +08:00 committed by GitHub
commit abb6256ae0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -34,6 +34,8 @@ CORS(app)
bcrypt = flask_bcrypt.Bcrypt(app)
jwt = flask_jwt_extended.JWTManager(app)
Markdown(app)
# fix for gunicorn bug
app.config["PROPAGATE_EXCEPTIONS"] = True
@jwt.unauthorized_loader

View File

@ -222,7 +222,7 @@ def worker_process_func(q: queue.Queue, env: dict):
def main(num_worker):
context.init_database()
context.init_logger(target="file")
context.init_logger()
context.init_engine()
context.init_redis()
context.init_sensitive_words()