mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 15:31:05 +08:00
Fix secret key inconsistency cross the RAGFlow servers (#14591)
### What problem does this PR solve? A and B, two API servers and a REDIS server. If A and REDIS restart, B will hold the obsolete secret key and will lead to error. TODO: app.config['SECRET_KEY'] and app.secret_key still hold obsolete secret key. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -58,7 +58,7 @@ def setup_auth(login_manager):
|
||||
return None
|
||||
|
||||
# Decode JWT to get the UUID access_token
|
||||
jwt = Serializer(secret_key=settings.SECRET_KEY)
|
||||
jwt = Serializer(secret_key=settings.get_secret_key())
|
||||
access_token = str(jwt.loads(jwt_token))
|
||||
|
||||
if not access_token or not access_token.strip():
|
||||
|
||||
Reference in New Issue
Block a user