core icon indicating copy to clipboard operation
core copied to clipboard

Redirect not working

Open jbrhinalyn opened this issue 8 years ago • 3 comments

Hi,

I had this code working before but now its not. In the console.log, the url is display but when using response.redirect, it doesn't redirect anymore.

Is there something wrong in calling the response.redirect?

Thanks.

var callback = function(err, data) { if (err) { return response.status(500).send(err); } if (data){ console.log(data.redirectUrl) return response.redirect(data.redirectUrl); } }

jbrhinalyn avatar Sep 04 '18 06:09 jbrhinalyn

Hey @jbrhinalyn 👋

Please, read this part of the doc: https://adonisjs.com/docs/4.1/response#_no_callbacks_please

RomainLanz avatar Sep 04 '18 07:09 RomainLanz

Thanks @RomainLanz .

I have no choice because the payment gateway that i'm using uses that kind of coding. I just add response.implicitEnd = false to make it works upon reading the documentation.

Thanks Bro.

jbrhinalyn avatar Sep 04 '18 08:09 jbrhinalyn

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Mar 11 '20 03:03 lock[bot]