Now returning a response 200 and JSON object with redirect url instead of using res.redirect