fix(backend): fix 'missing authorization header' error

This commit is contained in:
zouxiaochuan 2024-02-07 19:01:16 +08:00
parent 9f5005ea4d
commit 32b9a9fbcf
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()