IPFS request blocked by CORS policy

Hi, we’ve started getting this:

Access to fetch at ‘https://ipfs.infura.io:5001/api/v0/add?pin=true&stream-channels=true’ from origin ‘https://test.app.2key.network’ 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.

Anyone know what’s going on?

We haven’t made any changes to our cors policy in a couple months. It’s possible you’re getting an error which does not have cors headers and is causing the response to come back that way.

Can you provide information on the requests you’re sending, volume, size, code snippet, etc.

Im also having CORS issues on Infura mainent?

Which browsers are you guys currently using?

I find Safari and iOS are the most affected, there a several issues around this at the moment, it would be great to get some resolution to this, at the moment our DApp basically is dead in the water if we want to use Infura on Safari?



Any help or suggestions on how to fix this would be awesome.

thanks guys

I encounter the same problem when using ipfs.infura and using Chrome.

Error: Access to fetch at ‘https://ipfs.infura.io:5001/api/v0/add?stream-channels=true’ from origin ‘http://localhost:3000’ 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.

My code previously worked a few weeks ago.

Hi,

Confirming the problem here, and it was working perfectly yesterday…

It might be because I upgraded my browsers… Ubuntu + Firefox 65.0.1 + Chrome 70.0.3538.77

I’ll ask colleagues to see if they have the same problem.

Edit: same for colleagues, and it’s unlikely they had no browser upgrade

Are you still experiencing issues?

1 Like

It’s working again :slight_smile:

Thank you Mike!

1 Like

If you got here looking for why web3 calls are failing due to CORS headers, here is a post for that. Infura CORS Issue with Gecko and Webkit

Summary: Web3 is fixing the issue, in release beta-.51