ping-eos icon indicating copy to clipboard operation
ping-eos copied to clipboard

Failed to load http://127.0.0.1:8888/v1/chain/get_code: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Open yangjm20 opened this issue 6 years ago • 2 comments

Failed to load http://127.0.0.1:8888/v1/chain/get_code: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. apigen.js:118 api error => http://127.0.0.1:8888/v1/chain/get_code {"account_name":"ping.ctr"} TypeError: Failed to fetch

yangjm20 avatar May 12 '18 08:05 yangjm20

I think you need to set your headers in your eos config file (config.ini) to allow all (or specified ips).

access-control-allow-origin = *

BenHigh5 avatar May 23 '18 23:05 BenHigh5

Also make sure you look for your config.ini file is the right one. I was trying one found in ~/Documents/eos-wallet

For MacOS But you should actually be looking: ~/Library/Application\ Support/eosio/nodeos/config/config.ini

msj121 avatar Jul 05 '18 18:07 msj121