I have a checkout page and I want to send the user to bank for payment. I thought that this will be as simple as Turbo.visit('https://bank.com/payment?token=xyz')
. But I feel that Turbo is trying to fetch from bank which fails because of CORS.
Documentation at https://turbo.hotwire.dev/reference/drive for Turbo.visit
says:
If location is a cross-origin URL, or falls outside of the specified root (see Setting a Root Location), Turbo performs a full page load by setting
window.location
.
Why Turbo.visit()
does not “redirect” to bank page in this scenario?