On Firefox:
conn
|> Plug.Conn.put_status(resp.status_code)
|> put_flash(:error, resp.body)
|> redirect(to: credit_card_path(conn, :index))
How can I just redirect without showing this screen?
On Firefox:
conn
|> Plug.Conn.put_status(resp.status_code)
|> put_flash(:error, resp.body)
|> redirect(to: credit_card_path(conn, :index))
How can I just redirect without showing this screen?
It “shouldn’t” be showing that screen. Redirect sets a Location header with 302 to immediately redirect, so the browser shouldn’t be showing the body, it should immediately redirect, the body is a fallback for ancient browsers or curl
or so.
I’m using Firefox Developer Edition. Do you think it’s just the browser intercepting this redirect in a misguided attempt at user-security?
I remember this same code used to just redirect like you’d expect.
Or because it’s a dev edition it does that to let you inspect the redirection flow?
Just to make sure, your status code is a redirection status code (302/303/etc…) yes?
Marking this as solved! The status code was NOT coming back a 302 for some reason. Pinging our API team
Thanks for the assist @OvermindDL1
Lol, that would do it. I should remember more to check the basics first. “Is it plugged in?” ^.^;