All things Shopify and commerce
Access to fetch at 'https://*******.myshopify.com/admin/products/577154096292/metafields.json'
(redirected from 'https://domain.com/admin/products/577154096292/metafields.json')
from origin 'https://domain.com' 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.
That error makes sense to me as you are trying to fetch across domains. It does raise alarm bells for me though as it looks like this call is being done in the browser. Is it? That won't be secure.
Can you share a little more about what you are trying to do and the tool being used to do the fetch?
Hi Jason,
I am trying to get the product meta-fields value in liquid file using script with below format.
fetch(`/admin/products/577145380004/metafields.json`)
We have Primary Domain & Shopify Managed domain to the same store these are redirecting(pointing) from each other and returning CORS policy Error.
Hi jason, thank for your answer I have had the same problem, I am just trying to connect with a API of the Interfuerza CRM, I cheked it in postman and works very good, but when I do the fetch from my .js file, i have the same error, please if you have any idea 🙏🏻
"Access to fetch at 'https://app.interfuerza.com/api/v4/' from origin 'https://patri-test-store.myshopify.com' 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. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."
Hi jason, thank for your answer I have had the same problem, I am just trying to connect with a API of the Interfuerza CRM, I cheked it in postman and works very good, but when I do the fetch from my .js file, i have the same error, please if you have any idea 🙏🏻
"Access to fetch at 'https://app.interfuerza.com/api/v4/' from origin 'https://patri-test-store.myshopify.com' 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. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024