feat(config): Refactor configuration management
- Optimize JWT Auth module to load configuration via `global_args`. - Decouple configuration-related code from `utils_api.py`, and add a new `config.py` file for unified configuration management. - Adjust configuration import in `lightrag_server.py`, `auth.py`, and `document_routes.py` to be introduced through `global_args`.
This commit is contained in:
@@ -160,7 +160,9 @@ REDIS_URI=redis://localhost:6379
|
||||
### For JWT Auth
|
||||
AUTH_ACCOUNTS='admin:admin123,user1:pass456' # username:password,username:password
|
||||
TOKEN_SECRET=Your-Key-For-LightRAG-API-Server # JWT key
|
||||
TOKEN_EXPIRE_HOURS=4 # expire duration
|
||||
#TOKEN_EXPIRE_HOURS=4 # Expire duration, default 4
|
||||
#GUEST_TOKEN_EXPIRE_HOURS=2 # Guest expire duration, default 2
|
||||
#JWT_ALGORITHM=HS256 # JWT encode algorithm, default HS256
|
||||
|
||||
### API-Key to access LightRAG Server API
|
||||
# LIGHTRAG_API_KEY=your-secure-api-key-here
|
||||
|
Reference in New Issue
Block a user