Questions tagged [cors]

Use this tag when you see a message in the browser devtools console about CORS (Cross-Origin Resource Sharing) — e.g., your browser logged an error about Access-Control-Allow-Origin, and you want to know how to eliminate the error. Also for other questions on the CORS protocol (defined in https://fetch.spec.whatwg.org/ as a way to use response headers to tell browsers to relax the same-origin policy and allow cross-origin XHR/Fetch/Ajax requests).

Filter by
Sorted by
Tagged with
2 votes
1 answer
77 views

CORS Policy Blocking Axios Request with 0x-api-key Header to 0x API on Goerli Network

I'm currently working on a project where I use the 0x API on the Goerli network to swap tokens. I'm making an HTTP GET request using axios from a web application served from http://localhost:3000. ...
Kyle Noll's user avatar
2 votes
1 answer
26 views

Is there a way to only allow minting from a website's domain? I'm looking for a way other than whitelisting to prevent bot attacks on my nft launch

I have an NFT contract that uses merkle proofs to ensure that everyone who mints an NFT has been whitelisted. My mint function takes merkleProof as a parameter and runs isValidMerkleProof(merkleProof, ...
ChristianOConnor's user avatar
1 vote
0 answers
46 views

CORS Issue with the /quote 0x API endpoint

I'm a new web2 fullstack web dev trying to get his feet in web3 and i've tried to create my first web3 dApp. For the profile section and displaying a users' NFT and tokens balances I easily managed my ...
GetMoustache's user avatar
0 votes
1 answer
96 views

fetching pinata works in dev environment but in production it does not?

I have an Nft contract and this is fetching on react.js const fetchNfts=async () => { const nfts = [] as Nft[]; const onSaleNfts = await contract!.getAllNftsOnSale(); for (let i = 0; i ...
Yilmaz's user avatar
  • 1,540
0 votes
0 answers
23 views

Can not view my listed NFTS on my NFT Marketplace frontend

I followed alchemy road to web3 tutorial on NFT market place. After listing the NFTs and then go to the market place to view my listed NFTs I get a has been blocked by CORS policy error. I used "...
Chukwuebuka's user avatar
1 vote
2 answers
458 views

Access blocked by CORS policy

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 ...
Thierry Grandjean's user avatar
1 vote
0 answers
380 views

Etherscan now using No 'Access-Control-Allow-Origin' header is presen

First post here. I've been building quite well making a game on Ethereum but mainly just been trying to get the basics right and concentrating on the deposit and withdraw section of my dapp. ...
Graham's user avatar
  • 21
0 votes
1 answer
104 views

Cors Issue with Hyper Ledger Private Block chain network on Aws

I am new to hyper ledger and trying to set up a private block chain network with clique as consensus protocol. I am deploying it on a AWS Ec2 Instance. Followed these steps and initiated a boot node ...
Manzoor's user avatar
  • 11
1 vote
1 answer
547 views

Cross Origin Blocked? Setting up Infura provider [closed]

useEffect(() => { const loadWeb3 = async () => { const web3 = new Web3( new Web3.providers.HttpProvider("https://mainnet.infura.io/censored") ); let n = await web3....
Dwyte's user avatar
  • 121
2 votes
1 answer
987 views

Couldn't connect to node because cross-origin request is blocked

I am running a full rinkeby node via geth --rinkeby --rpc --rpcapi db,eth,net,web3,personal --cache=2048 --unlock="..." --password ... --rpccorsdomain "*" --allow-insecure-unlock --rpcaddr "...
mcb's user avatar
  • 121
1 vote
3 answers
2k views

WEB3JS CORS ERROR

I have a empty html file that call to a js file. Inside that file I have this coded. if (typeof web3 !== 'undefined') { web3 = new Web3(web3.currentProvider); } else { // set the provider you ...
UnexpectedCharacter's user avatar
2 votes
3 answers
2k views

Unable to execute web3.eth.accounts[0]

I'm following along with this short tutorial and ran into a few problems. I'm running testrpc in my console. However, every time I run my index.html I get an error. My index.html file is the following:...
BeepBoop's user avatar
  • 135
2 votes
0 answers
173 views

Can not access quorum's contract from webpage *CORS*

I am getting following error on browser's console while accessing contracts. Failed to load http://localhost:22000/: Response to preflight request doesn't pass access control check: No 'Access-...
Mr_Hmp's user avatar
  • 188
2 votes
1 answer
1k views

Can no more connect to my local node using web3

I start my local node using the following command: geth --datadir "D:\EthereumLocalNode" --networkid 1114 console 2>> "D:\EthereumLocalNode\myLog.log" --rpc --rpccorsdomain "*" --nodiscover --...
Mehmet Katircioglu's user avatar
19 votes
2 answers
29k views

What is http://localhost:8545?

Why do some ethereum related websites (for example regis.nu, there are many others) tell me they cannot find a node running at http://localhost:8545 and what can I do about that? Regis.nu allowed me ...
Thomas Jay Rush's user avatar
4 votes
1 answer
3k views

Browser will not connect to running Geth: NS_ERROR_UNKNOWN_PROTOCOL

My Geth tutorial Greeter contract runs fine from the command line. I tried to make a front end that just outputs the string from Greeter, but the browser console returns the error, '...
Bill LaPrise's user avatar
1 vote
1 answer
245 views

How to offer free DApps for users without any barriers? [duplicate]

How to offer decentralized applications or services for users without introducing any barriers like running a full ethereum node? enabling rpc api on the node? explaining the user which rpc cors ...
q9f's user avatar
  • 32.8k
4 votes
1 answer
536 views

Is it possible to check which RPC APIs are available?

Is it possible for a decentralized application to get details about the offered JSON-RPC APIs from the local ethereum node? I want to check the following specs in the following order using web3.js: ...
q9f's user avatar
  • 32.8k