You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Failed to load https://mainnet.nebulas.io/v1/user/call: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'xxxx' is therefore not allowed access. The response had HTTP status code 522.
有时,在浏览器控制台可以看到以下错误信息:
出现这种错误并不是你的代码出了问题,而是服务器不稳定,报 522 错误。522 状态码误表示 “Connection Timed Out”,连接超时。
此时往往重新请求一次就能得到正常的结果。如有必要,可以考虑在自己的代码中增加重试机制。
至于浏览器为什么会报跨域错误,大家可以详细了解一下 CORS 的原理。
The text was updated successfully, but these errors were encountered: