node作为后端,这样设置:
ctx.set('Location', '/register'); ctx.status = 301; ctx.body = 'Redirecting to shopping cart';
前端没有跳到新地址而是发送了一个请求,而且请求域名也不对(应该是前端的地址,但是这里是服务器的地址)
更像是一个内部的转发操作
如何解决?
重定向只能更改请求的地址 不能重定向前端的路由
1.4m articles
1.4m replys
5 comments
56.7k users