[ISSUE]: CORS issue when using Moralis IPFS with Shopify

Hi there.

We are having some issue with using moralis ipfs URL/hash when trying to upload/set an image to a shopify product.

This is what we see in the log when trying to Add Media from URL.

Refused to load the image 'https://ipfs.moralis.io:2053/ipfs/{hash}' because it violates the following Content Security Policy directive: "default-src 'self' data: blob: https://* shopify-pos://*". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback.

I think this might be an issue on moralises part, but not sure. Tried pinata IPFS and there are no issues there. Would rather try to avoid any other service than yours if it is possible. Thank you guys very much.

Great work by the way!

you can change this url to use pinata or other ipfs gateway without problems
you can also try with https://gateway.moralisipfs.com

Thank you very much. Using https://gateway.moralisipfs.com works. Is this URL documented anywhere in Moralis DOCS?

this should be the new url for ipfs for the new files that are uploaded to ipfs

Maybe the docs should be updated, the URL to GET the file from IPFS.
https://docs.moralis.io/moralis-server/files/ipfs#getting-files

docs are updated now

1 Like