Shopify store does not respect the defined app proxy

JVillella
Visitor
1 0 0

This is a fairly alarming bug, and I hope it's just my mistake. We set the app proxy like so,

JVillella_1-1616773277884.png

 

But when we install the app (and it's the only app installed on the store) the proxy has a `-2` suffix. So of course we get 404s as a result when using it. I tried deleting the proxy and recreating it, uninstalling/reinstalling the app, etc. nothing fixes it. The only fix is to manually update it on page below. However, this is a store-page that the developer doesn't have access to. Furthermore, why does a store owner have the ability to change an implementation detail (the hostname) of the app? That'd be like a user could change what server an iOS app points to... what am I missing?

JVillella_0-1616773206902.png

Reply 1 (1)

_JCC_
Shopify Staff
200 27 55

Hey @JVillella,

Happy to help you out with this. The merchant does have control over the sub path prefix (a, tools, app, community), and sub path, as documented here. Regardless of what change a merchant might make, the requests should still be routed to the domain your specify in the proxy configuration of your app. The path_prefix is provided in the request allowing you to know what the merchant may have changed the sub path, and sub path prefix to.

In this instance I believe the app was re-installed without un-installing first. When this happened, as part of the app install the sub path was already in use so boreal-partners became boreal-partners-2. I'm not sure if the uninstall should have been necessary, but that's what my own testing is showing. I'm going to create an issue to investigate this further. 

Regards, 

John

John C | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog