I’m currently developing an application that creates pages in an installed shop using an app proxy. While this works perfectly when the shop uses the default proxy URL provided by my app, the issue arises when the merchant edits the proxy URL. In such cases, the existing links become invalid.
According to your documentation, it’s clearly stated that merchants can change the proxy URL without affecting the server. However, in practice, this is not the case, and it creates significant challenges. It would be highly beneficial if Shopify exposed a method to dynamically retrieve the current proxy URL for an installed shop.
This issue is particularly frustrating when developing for merchants, as they may not understand the technical implications of changing the proxy path. It puts developers in a difficult position, trying to explain why the app no longer works as expected. I kindly suggest either updating the documentation to reflect this behavior or implementing a fix that ensures the proxy URL can be dynamically accessed.
Additionally, improving the App Proxy experience for Remix apps would enhance the overall developer experience. Below is a simplified example of how we’re handling app proxies:
return (
<AppProxyProvider appUrl={appUrl}>
<AppProxyForm action="/apps/appProxy" method="post">
<input type="text" name="field" defaultValue="Enter text here" />
<input type="submit" name="Submit 2" />
</AppProxyForm>
</AppProxyProvider>
);
P.S.: I’ve tried using Liquid to dynamically render the form action, and it works flawlessly:
<form id="multiStepForm" method="post" action="{{ shopify.app_proxy.url }}">