parent
8bedb1f3b9
commit
b99b4159c8
@ -123,10 +123,18 @@ http:
|
|||||||
|
|
||||||
# Connection to the Redis server.
|
# Connection to the Redis server.
|
||||||
redis:
|
redis:
|
||||||
# Syntax: redis://[db[:password]@]hostname[:port]
|
# Syntax: redis://[db[:password]@]hostname[:port][/db-number]
|
||||||
#
|
#
|
||||||
# Default: redis://localhost:6379
|
# Default: redis://localhost:6379/0
|
||||||
#uri: ''
|
#uri: redis://redis.company.lan/42
|
||||||
|
|
||||||
|
# List of aliased commands.
|
||||||
|
#
|
||||||
|
# See http://redis.io/topics/security#disabling-of-specific-commands
|
||||||
|
#renameCommands:
|
||||||
|
# del: '3dda29ad-3015-44f9-b13b-fa570de92489'
|
||||||
|
# srem: '3fd758c9-5610-4e9d-a058-dbf4cb6d8bf0'
|
||||||
|
|
||||||
|
|
||||||
# Directory containing the database of XO.
|
# Directory containing the database of XO.
|
||||||
# Currently used for logs.
|
# Currently used for logs.
|
||||||
|
@ -36,7 +36,7 @@ export default class Redis extends Collection {
|
|||||||
connection,
|
connection,
|
||||||
indexes = [],
|
indexes = [],
|
||||||
prefix,
|
prefix,
|
||||||
uri = 'tcp://localhost:6379'
|
uri
|
||||||
}) {
|
}) {
|
||||||
super()
|
super()
|
||||||
|
|
||||||
|
@ -41,7 +41,11 @@ export default class Xo extends EventEmitter {
|
|||||||
this._httpRequestWatchers = createRawObject()
|
this._httpRequestWatchers = createRawObject()
|
||||||
|
|
||||||
// Connects to Redis.
|
// Connects to Redis.
|
||||||
this._redis = createRedisClient(config.redis && config.redis.uri)
|
const redisConf = config.redis
|
||||||
|
this._redis = createRedisClient(redisConf && {
|
||||||
|
rename_commands: redisConf.renameCommands,
|
||||||
|
url: redisConf.uri
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user