Skip to content

Commit

Permalink
fix url.auth problem
Browse files Browse the repository at this point in the history
  • Loading branch information
undoZen committed Jan 9, 2014
1 parent 156bffc commit 66f0fdb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/connect-redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ module.exports = function(connect){
if (options.url) {
var url = require('url').parse(options.url);
if (url.protocol === 'redis:') {
if (url.user) {
var userparts = url.user.split(":");
if (url.auth) {
var userparts = url.auth.split(":");
options.user = userparts[0];
if (userparts.length === 2) {
options.pass = urlparts[1];
options.pass = userparts[1];
}
}
options.host = url.hostname;
Expand Down

0 comments on commit 66f0fdb

Please sign in to comment.