英文:
Stripe.js CORS error flooding console in React app
问题
我已经在我的React应用中使用了@stripe/react-stripe-js和@stripe/stripe-js,尽管在测试环境中所有的付款都成功,但控制台会出现以下错误:
跨源请求被阻止:同源策略不允许读取远程资源https://r.stripe.com/0。 (原因:CORS请求未成功)。 状态代码:(null)。
我应该忽略这些错误吗,因为付款正常工作,为什么Stripe服务器没有处理CORS?
英文:
I have implemented @stripe/react-stripe-js and @stripe/stripe-js in my React App and although all the payments are successfull in test environment, the console is flooded with errors as per below:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://r.stripe.com/0. (Reason: CORS request did not succeed). Status code: (null).
Should I be ignoring these as the payments work and why is stripe not handling CORS on their servers?
答案1
得分: 0
From looking at similar questions on Stackoverflow here and here, r.stripe.com
is just for tracking metrics and it should not have any impact on the ability to make payments. For this reason, you can ignore these errors you see on your console.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论