App proxy still an issue?

Rhobur
Shopify Partner
3 0 0

Hello!
I have set up an app proxy but it does not work, there is no redirection.
It is set up like this:
Subpath prefix: apps
Subpath: test
Proxy URL: https://my.devsite.com/api
I have added a link in a theme section, with href="/apps/test/endpoint" and expected that a GET to https://my-shop.myshopify.com/apps/test/endpoint will reach https://my.devsite.com/api/endpoint
It doesn't happen, no redirection at all, the browser just loads https://my-shop.myshopify.com/apps/test/endpoint with a 500 error.
I have read dozens of posts and docs, no luck yet.
Anybody has an idea of what might be wrong please?
Best Regards,
Robert

Replies 3 (3)
Rhobur
Shopify Partner
3 0 0

EDIT: a day later it suddenly worked without any changes so I assume there is some kind of lag/caching involved in this proxy app business.
Should this have been documented it would have spared me a full day hassle 😞
Still there is an issue, the parameter logged_in_customer_id comes empty although the request is sent with a logged in customer.
I'll wait for another day maybe it gets solved automatically again 🙂

Rhobur
Shopify Partner
3 0 0

EDIT2: this is driving me crazy, no wonder many devs run away from Shopify 😞
Removed the old proxy URL to subdomain, created a new proxy URl with domain instead of subdomain, removed the app from the dev shop and installed it again.
Since then, couple of days ago,  I get the 500 error again.

deekorsq
Shopify Partner
3 1 0

You don't want to use a standard link with a href. The proxy only works if you make fetch calls from the client JS to the proxy endpoint