让node通过接口控制页面跳转,使用了res.redirect(301, 'http://example.com'),但是页面并没有跳转到设置的链接。
network中有这个链接的记录,但真实的url地址并没有跳转
userInfo(req, res, next) {
try {
if (!req.session.uid) {
res.redirect(301, 'http://example.com');
return
} cathc(error) {
}
}