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

CORS policy problem #7

Open
stephane303 opened this issue Feb 7, 2021 · 1 comment
Open

CORS policy problem #7

stephane303 opened this issue Feb 7, 2021 · 1 comment

Comments

@stephane303
Copy link

When I try to connect my wallet it doesn't work and see this in the console:
Access to XMLHttpRequest at 'https://api.coinmarketcap.com/data-api/v1/farming/yield/latest' from origin 'https://yieldfarmingtools.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. b1c7e46c61a1f7c247cc66701dd3fb140f85194c.0244ad4d637252ec62e0.js:1 Error: Network Error at LYNF.e.exports (2c33f15ee62acfe8da3fc8f8ef84c026a020e16f.bf028d44d9aa4e16f235.js:1) at XMLHttpRequest.p.onerror (2c33f15ee62acfe8da3fc8f8ef84c026a020e16f.bf028d44d9aa4e16f235.js:1) (anonymous) @ b1c7e46c61a1f7c247cc66701dd3fb140f85194c.0244ad4d637252ec62e0.js:1 api.coinmarketcap.com/data-api/v1/farming/yield/latest:1 Failed to load resource: net::ERR_FAILED yieldfarmingtools.com/:1 Access to fetch at 'https://etherchain.org/api/basic_stats' from origin 'https://yieldfarmingtools.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. etherchain.org/api/basic_stats:1 Failed to load resource: net::ERR_FAILED 16b1c7e46c61a1f7c247cc66701dd3fb140f85194c.0244ad4d637252ec62e0.js:1 Error: call revert exception (method="poolInfo(uint256)", errorSignature=null, errorArgs=[null], reason=null, code=CALL_EXCEPTION, version=abi/5.0.5) at t.makeError (0d2a819d.f32b3861fad7b297343b.js:1) at t.throwError (0d2a819d.f32b3861fad7b297343b.js:1) at t.decodeFunctionResult (0d2a819d.f32b3861fad7b297343b.js:1) at r.<anonymous> (0d2a819d.f32b3861fad7b297343b.js:1) at 0d2a819d.f32b3861fad7b297343b.js:1 at Object.next (0d2a819d.f32b3861fad7b297343b.js:1) at s (0d2a819d.f32b3861fad7b297343b.js:1)

@PaulRBerg
Copy link

This is an issue on Etherchain's behalf. They are not using CORS in their API implementation.

In the meantime the solution is to use another API for gas prices.

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

2 participants