fix: Redis ACL 连接增加 username 参数
This commit is contained in:
@@ -8,6 +8,7 @@ function getRedis() {
|
|||||||
_redis = new Redis({
|
_redis = new Redis({
|
||||||
host: process.env.REDIS_HOST || "127.0.0.1",
|
host: process.env.REDIS_HOST || "127.0.0.1",
|
||||||
port: parseInt(process.env.REDIS_PORT || "6379"),
|
port: parseInt(process.env.REDIS_PORT || "6379"),
|
||||||
|
username: process.env.REDIS_USERNAME || undefined,
|
||||||
password: process.env.REDIS_PASSWORD || undefined,
|
password: process.env.REDIS_PASSWORD || undefined,
|
||||||
db: parseInt(process.env.REDIS_CACHE_DB || "0"), // API 缓存专用 DB
|
db: parseInt(process.env.REDIS_CACHE_DB || "0"), // API 缓存专用 DB
|
||||||
lazyConnect: true,
|
lazyConnect: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user