On my remote server, I have http://app.myapp.com/ajax/test/ returns a simple string back. (python backend, url tested to be working)
When I’m access https://myshop.myshopify.com/apps/ajax/test. It gives me 404. I double check on my app server. No http request was received. Can anyone help me understand what’s going wrong with this setup? I couldn’t find anything to help me in the documentation.
You’re absolutely right! I just tested it on my test app, and it should work with the third slash in the path. Can you let me know the shop and app name you are trying this with so I can take a look?
Assuming you have a route in your app at http://app.myapp.com/ajax/test, and the proxy page is set up properly in the admin of the shop you are using, you should be good.
It looks like the proxy page in your shop admin is setup at /apps/app rather than /apps/ajax. If I go to https://william-switzer.myshopify.com/apps/app/test, it works. You can update the address in your admin here:
Just in case it helps some people, as I was banging my head against the wall on this. I was using a local dev environment to test the Shopify App signup and App page processes, which work fine as the requests come from directly your browser.
The app-proxy, on the other hand, involves Shopify’s backend (not your browser) making an HTTP request to your Proxy URL to download the contents of your page.
In my case, the Proxy URL I was using was not publicly accessible, so once I switched to use Ngrok it worked fine.