I have created a Shopify custom app using remix so in theme extension I am fetching the data from my app routes that I have defined like this /badge-data .
I have setup the app proxy in partners page also like this:
Subpath prefix : /apps
Subpath : /badge
Proxy URL : /badge-data
In the theme extension I am fetching data like this
async function getBadgeData() {
try {
const response = await fetch("/apps/badge", {
method: "get",
});
console.log(response);
if (!response.ok) {
throw new Error("Network response was not ok");
}
const data = await response.json();
console.log("data=", data);
return data;
} catch (error) {
console.log("error", error);
}
}
getBadgeData();
getting 404 error even though the route is exists . I have created proxy for other apps and they are working fine don’t know why this is not working