res.redirect('back') with parameters

后端 未结 7 2012
刺人心
刺人心 2020-12-23 09:44

I have a register form on every page of my website. During registration some error may occur. After catching the error, I have to return the user to the previous page, sho

7条回答
  •  抹茶落季
    2020-12-23 10:04

    If you're using sessions, you can just add that reg_error object to the req.session object before your redirect. Then it will be available on the req.session object when you're loading the previous page.

提交回复
热议问题