Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
As the title states, a web pixel attempting to make fetch requests to the same origin is hit with this error:
RestrictedUrlError: Requests are not allowed to the same origin:
This is especially brutal because it means that web pixels cannot communicate to the backend via app proxies. Why does this limitation exist? Is it documented anywhere?
Even more confusing, the documentation About web pixels mentions:
fetch and related globals (Headers , Request , and Response ), which can be used to make HTTP requests to arbitrary endpoints. Note: Any requests you make must explicitly support cross-origin resource sharing (CORS) , just as they would if the request were coming from fetch() outside of a web worker.
I would assume that app proxies would be included in the category of "arbitrary endpoints".
Any help would be much appreciated.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025