#Jed

1 messages ยท Page 1 of 1 (latest)

clever heraldBOT
golden ermine
#

I just found this...

vivid fjord
#

I'm still trying to wrap my head around this a bit. Is your browser having some issue loading our Checkout pages as a result of this issue? Or are you seeing some other weird behavior?

golden ermine
#

I'm returning a 302 redirect to the url in the session response

#

making a get request from axios to my server, the server httpresponse header is 302 and the Location is the URI returned by the stripe api call

vivid fjord
#

Ah so your 302 redirect is getting blocked because of CORS?

golden ermine
#

yes

#

but, i believe it may be related to the fact that the fragment portion of the uri is not being included in the browsers get request to stripe

#

technically that shouldn't be related to cors though....

#

DNS is Azure

vivid fjord
#

I am admittedly not that familiar with how CORS may affect this. Can try to look in to this though. What is the exact error that the browser is giving you?

golden ermine
#

Access to XMLHttpRequest at 'https://checkout.mycustomdomain.com/c/pay/cs_test_a1IPCrr45bDxEO4QguKHLs8oshzYoL8z5B180MsAIXQSN0g2i80lSJA2u0#fidkdWxOYHwnPyd1blpxYHZxWjA0QDxiVmdEM1dKdHZdZFFOUm0ySW.......bHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl' (redirected from 'https://api.mycustomdomain.com/api/sample_purchase') from origin 'https://mycustomdomain.com has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

#

i replaced my actual address and the session key w/ dummy data

#

could it have anything to do w/ the Authorization header on the initial request?

#

I'm using a bearer token w/ an unrelated identity provider

sharp geode
#

Hi ๐Ÿ‘‹

Let me check a few resources to see if we've run into this

#

And just to be clear, how are you triggering the redirect? Is your server-side code is performing this action?

golden ermine
#

yes, azure functions v4

#

req.HttpContext.Response.Headers.Add("Access-Control-Allow-Origin", "*");
req.HttpContext.Response.Headers.Add("Location", session.Url);
return new StatusCodeResult(303);

#

.net core

sharp geode
#

Hmmm ... ๐Ÿค”

sharp geode
golden ermine
#

I managed to whittle it down to axios

#

the redirect works correctly using postman

sharp geode
#

๐ŸŽ‰