Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to XMLHttpRequest at 'https://mempool.space/testnet/api/tx' from origin 'http://localhost:5173' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status. #185

Open
YaminZheng opened this issue Apr 18, 2024 · 0 comments

Comments

@YaminZheng
Copy link

你应该让他可以自定义 axios headers
至少我在 "@mempool/mempool.js": "^2.3.0" 版本中,只看到了
{
hostname: HOST_NAME,
network: NETWORK,
}
这两个参数
当我使用 axios 调用接口时,如果参数时 application/json 他就会报这个错误
当我改为 text/plain 。且传递的body是一个字符串的时候才会正常回应

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant