I have an Ubuntu machine running two docker nodes. When I try to access nodes from my web based application, installed on the same machine I keep getting the following error :
web3.min.js:2 Access to XMLHttpRequest at ‘http://localhost:8502/’ from origin ‘http://localhost:8000’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Even if my starting command is the following:
CMD exec ./geth –syncmode ‘full’ –port 30313 –rpc –rpccorsdomain ‘*’ –rpcaddr ‘0.0.0.0’ –rpcport 8503 –rpcapi personal,db,eth,net,web3,txpool,miner –bootnodes "enode://[email protected]$bootnodeIp:30311" –networkid="1005" –gasprice ‘1’ -unlock $address –password ~/.password –mine
so including : –rpccorsdomain ‘*’
Result is the same with google chrome and with Firefox. Connection with Metamask is working well.
Can anybody help ?