So, I’m developing a shopify app with a theme extension, there are 2 shopify apps linked with the same code base one for deployment, second for testing. In the liquid code of the extension I’m making an api call through the app proxy, currently it is hardcoded to the proxy path and subpath of the first app, but when i run the second app, it doesn’t work properly because it’s proxy subpath is different than the first. What should I do to dynamically get the proxy path and subpath of the current app, instead of hardcoding it?
Topic summary
Issue: A Shopify theme extension makes API calls via an App Proxy, but two linked apps (prod and test) share the codebase with different proxy path/subpath values. Hardcoded proxy settings point to the first app, causing the second app to fail.
Goal: Dynamically determine the current app’s App Proxy path and subpath in Liquid, so the extension can build the correct proxy URL without hardcoding.
Context: The App Proxy is the storefront route that forwards requests from the theme to the app backend; its subpath differs per app configuration.
Status: Request for a method or best practice to fetch the active app’s proxy configuration at runtime in Liquid. No solution or consensus provided yet; discussion remains open.
1 Like