Redirect URL in Nodejs

Asked

Viewed 630 times

0

I am trying to redirect my login to a new site after the user validation function. After redirecting the url in Browse is from the url where the login was: http://localhost:2879/"https://web-stage.voxy.com/u/? auth_token=Olz8pxjy, should be just that part: https://web-stage.voxy.com/u/? auth_token=Olz8pxjy

    request('http://54.93.154.122:2801/'+doc.voxyid, function (error, response, body) {
  if (!error && response.statusCode == 200) {
    console.log(body);
    //console.log(error)
    res.redirect(JSON.stringify(body))

1 answer

1

Guys figured out the problem: res.redirect(JSON.stringify(body))

Rewriting: res.redirect(body), so it worked!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.