1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00

docs: add note about rediss usage

This commit is contained in:
calebboyd
2018-01-09 10:54:16 -06:00
committed by Ruben Bridgewater
parent 5d6e471d0c
commit 1a4c410b41
3 changed files with 13 additions and 11 deletions

View File

@@ -31,10 +31,10 @@ module.exports = function createClient (port_arg, host_arg, options) {
if (parsed.auth) {
options.password = parsed.auth.split(':')[1];
}
if (parsed.protocol && parsed.protocol !== 'redis:') {
if (parsed.protocol) {
if (parsed.protocol === 'rediss:') {
options.tls = options.tls || {};
} else {
} else if (parsed.protocol !== 'redis:') {
console.warn('node_redis: WARNING: You passed "' + parsed.protocol.substring(0, parsed.protocol.length - 1) + '" as protocol instead of the "redis" protocol!');
}
}