You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
Throw on other protocols provided than the redis protocol
This commit is contained in:
3
index.js
3
index.js
@@ -1270,6 +1270,9 @@ var createClient = function (port_arg, host_arg, options) {
|
||||
if (parsed.auth) {
|
||||
options.auth_pass = parsed.auth.split(':')[1];
|
||||
}
|
||||
if (parsed.protocol !== 'redis:') {
|
||||
throw new Error('Connection string must use the "redis:" protocol');
|
||||
}
|
||||
options.host = parsed.hostname;
|
||||
options.port = parsed.port;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user