meteorhacks / picker

Server Side Router for Meteor
MIT License
182 stars 30 forks source link

Is it possible to redirect? #27

Closed AdamBrodzinski closed 9 years ago

AdamBrodzinski commented 9 years ago

I can't find any info the guides or issues... is there a way to redirect inside of the route? I tried using req.redirect('/foo') but redirect was undefined.

arunoda commented 9 years ago

This is a low level router. So, you need to do this.

res.writeHead(301, {Location: "/foo"});
res.end();
AdamBrodzinski commented 9 years ago

Ah! Thanks!! Hey you're the best @arunoda !! :beers: