Closed blucet closed 7 years ago
Are you running this on a browser context? I'm asking because CORS doesn't apply to the node context, so I don't see how's that possible.
Yes I'm running this in the browser with Webpack. I ended up using corsproxy
to make it work as a temporary solution, but the right solution is of course not related to this library.
Enjoying bitcoin-core
so far, thanks!
That's strange, but I'm sure you've got the right reasons to do it :) you can try using the domain lvh.me
as that one points to 127.0.0.1
as well (bypassing some browser's limitations on using CORS with localhost).
Oh, and thanks for the comment of course!
Hello,
I'm running a Bitcoin node with
bitcoind
and the following configuration:When trying to connect with the following configuration and testing it with
getInfo
:I get the following error :
Failed to load http://localhost:8332/: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 501. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Is it possible to resolve that error without using something like "cors-anywhere"?
Thank you very much.