#LuchoRxs-cors-issue

1 messages · Page 1 of 1 (latest)

silk niche
#

Hey! Can you share some more details on your integration?

#

Are you using Checkout, or a custom flow/

viral thicket
#

Hi there, thanks for answering so fast

#

I'm using custom flow

#

This is the console error

#

Access to XMLHttpRequest at 'https://m.stripe.com/6' from origin 'https://m.stripe.network' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute

silk niche
#

Also, where are you trying to send your users back to with the 'Go back' button

viral thicket
#

To the previous page, would be checkout page

silk niche
#

Yeah, you can't return the users back to that page after a successful payment

#

What's the use case?

viral thicket
#

Ohh I see

#

I have a checkout page that our client uses to charge their clients

#

Is there any workaround for this? Or how should I change the flow in order to avoid this

silk niche
viral thicket
#

No, I'm using this one

#

Custom

silk niche
#

Got it. And how exactly are you redirecting users back? Can you share the code?

viral thicket
#

Yes, of course

#

Since I'm using React

#

I redirect with history.push()

silk niche
#

Hmm. Is there somewhere I can reproduce this?

#

To be clear this isn't really a Stripe problem I don't think

viral thicket
#

Let me share a endpoint so you can enter and reproduce the error

#

I recorded a loom video

#

Let me know if it's helpful

silk niche
#

What's the error before you refresh the page?

#

Also the initial page path is /payments and then you go 'back' to /payment. Is that deliberate?

viral thicket
#

I can't believe that /payment redirect was the mistake

#

I feel so silly

#

So sorry to bother you with this

#

Really appreciate your patience here

silk niche
#

I'm glad that's all it was!

#

Sometimes it just needs a fresh pair of eyes

viral thicket
#

Yes, me too.

#

Exactly, not the first time hahaha

#

Thanks a lot man! Have a nice one!!