[axios] IPFS Gateway Network Error

When I try to load something from IPFS using moralis gateway some people get the following error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://ipfs.moralis.io:2053/ipfs/IPFS_HASH_HERE. (Reason: CORS request did not succeed). Status code: (null).

The problem is, if I change the gateway to a different one, it fixes it for old users but now new users have the error.
And if I don’t do anything sometimes the gateway starts working for those users again. Looks random

I’m fetching the data like this:

await axios.get(postMedia).then(async(response) => {
    const jsonResponse = response.data;
    setPostContent(jsonResponse);
})

try to use this prefix for IPFS urls: https://gateway.moralisipfs.com/ipfs/

1 Like

For now it looks like it’s working! I’ll keep running the app with it and I’ll let you know if there are any problems!
Thanks! :slight_smile:

1 Like