Automattic / kue

Kue is a priority job queue backed by redis, built for node.js.
http://automattic.github.io/kue
MIT License
9.46k stars 867 forks source link

Still redirected to 'http://active' #231

Closed ghost closed 10 years ago

ghost commented 11 years ago

I'm using kue version 0.6.2 with express version 3.3.4.

When I go to 'http://localhost/', I'm redirected to 'http://active'.

I think this line https://github.com/LearnBoost/kue/blob/master/lib/http/index.js#L68 should be res.redirect('./active') instead of res.redirect('active')

jibay commented 11 years ago

I have the same problem with external domain not only localhost.

tvpavan commented 11 years ago

Yes default examples redirects to active as you had mentioned.

But I use it this way for express 3.3.4, it works.

var app = express(); app.configure(function() { app.use("/kue",express.basicAuth('uuuuu', 'pppp')); app.use("/kue",kue.app); }) app.listen(3000);

shirish87 commented 11 years ago

That looks like an obvious error and fix, @jackdbernier. Hope it gets fixed soon. In case anyone's interested, here's another workaround:

var app = express();
app.use(express.basicAuth('username', 'password'));
app.use(function(req, res, next) {
  if(req.path === '/') {
    return res.redirect('/active');
  }
  next();
});
app.use(kue.app);
app.listen(port);
behrad commented 10 years ago

merged in 0.7.0