#anastasiya-customer-portal
1 messages · Page 1 of 1 (latest)
@stark ivy The problem here is that you are redirecting server-side with res.redirect(). This doesn't work if you JS code uses fetch() or any equivalent AJAX request.
You need to tweak your JS code to submit the whole page so that your server can redirect
What do you mean by the whole page?
I mean that your code is doing a call to fetch() or equivalent. And that can't work. You have to do like a form submission
alternatively, return the session.url` in JSON and then client-side parse the JSON and get the URL and redirect
The second approach was actually my workaround. But my concern is that when I redirect it on client side it exposes the url. Isn’t it a security issue?
I don't think there's any security issue no, the URL is visible no matter what since you redirect to it
Hm, okay then. Thank you! 👍