Search code examples
e-commerceshopifyshopify-app

How does Shopify resolve conflicting App Proxy URLs?


A Shopify app proxy is a URL that an app can automatically set up for you. It is a URL that looks like a store's URL but it is actually proxied to some alternate app URL.

example: example.myshopify.com/a/test can be set up by an app to proxy to whatever URL the app wants.

Seen here are some settings from the partners dashboard: enter image description here

My question: what happens if two apps set up a proxy at /a/proxy, and the user installs both of those apps? example.myshopify.com/a/proxy could then go to one of two different places?

This seems like a disastrous circumstance? I'm really confused. What am I missing, here?


Solution

  • I discovered the answer to this through some testing.

    Shopify resolves the conflicting app proxy by appending a number onto the end of the Sub path portion of the most recent app URL.

    So, if a user installs app 1 with Sub path prefix as a and Sub path as test. And then user installs app 2 with the same Sub path prefix and Sub path then app 2 will automatically get a Sub path of test-1.