Skip to content

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

Description

@zLikeMario

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions