On Tuesday, December 6, 2011 at 9:14 AM, Paul Vencill wrote:
Express docs, say that the res.redirect() method 'respects mount points', so if I'm in an app mounted at /blog and I call res.redirect('/posts'), it'll redirect to /blog/posts. Is there any way to override that behavior? Specifically,I'd like my auth module to be able to redirect to /login from anywhere in the app (including inside mounted sub-apps).Thanks.
--
You received this message because you are subscribed to the Google Groups "Express" group.
To post to this group, send email to expre...@googlegroups.com.
To unsubscribe from this group, send email to express-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/express-js?hl=en.
> Express docs, say that the res.redirect() method 'respects mount points', so if I'm in an app mounted at /blog and I call res.redirect('/posts'), it'll redirect to /blog/posts. Is there any way to override that behavior? Specifically,I'd like my auth module to be able to redirect to /login from anywhere in the app (including inside mounted sub-apps).
Yeah. I wrote rather a lot of odd code to deal with this problem, so you're not alone. I don't think I should share what I did, since I'm not at all sure it's the best way to do it (it feels convoluted), but I'll be interested in the other responses.
--
You received this message because you are subscribed to the Google Groups "Express" group.
To post to this group, send email to expre...@googlegroups.com.
To unsubscribe from this group, send email to express-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/express-js?hl=en.