fix: Redis ACL 连接增加 username 参数

This commit is contained in:
ZhuiGuangAI Dev
2026-10-02 22:52:51 +08:00
parent 8205ae709c
commit 157d330110
+1
View File
@@ -8,6 +8,7 @@ function getRedis() {
_redis = new Redis({
host: process.env.REDIS_HOST || "127.0.0.1",
port: parseInt(process.env.REDIS_PORT || "6379"),
username: process.env.REDIS_USERNAME || undefined,
password: process.env.REDIS_PASSWORD || undefined,
db: parseInt(process.env.REDIS_CACHE_DB || "0"), // API 缓存专用 DB
lazyConnect: true,