No 'Access-Control-Allow-Origin' header is present on the requested resource
Hi all,
I tried to get Block Infor following README.md instruction. But there is an issue. Anyone know how to solve it?
Failed to load http://127.0.0.1:8888/v1/chain/get_info: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' 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.
The following code should be included in the config.ini of nodeos. access-control-allow-origin = *
I've used Docker and also tried to modify the config.ini in Docker folder. But the issue still happen. Here:
The local IP and port to listen for incoming http connections; set blank to disable. (eosio::http_plugin) http-server-address = 0.0.0.0:8888
The local IP and port to listen for incoming https connections; leave blank to disable. (eosio::http_plugin)
https-server-address =
Filename with the certificate chain to present on https connections. PEM format. Required for https. (eosio::http_plugin)
https-certificate-chain-file =
Filename with https private key in PEM format. Required for https (eosio::http_plugin)
https-private-key-file =
Specify the Access-Control-Allow-Origin to be returned on each request. (eosio::http_plugin) access-control-allow-origin = *
Specify the Access-Control-Allow-Headers to be returned on each request. (eosio::http_plugin)
access-control-allow-headers =
Specify the Access-Control-Max-Age to be returned on each request. (eosio::http_plugin)
access-control-max-age =
Specify if Access-Control-Allow-Credentials: true should be returned on each request. (eosio::http_plugin) access-control-allow-credentials = false
You can use chrome extension "Allow-Control-Allow-Origin: *", just install this extension to chrome.
link: https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en
