Stripe.js在React应用中引发CORS错误,不断填充控制台。

huangapple go评论63阅读模式
英文:

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.

英文:

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.

huangapple
  • 本文由 发表于 2023年2月7日 00:46:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/75364201.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定