For anyone that is still getting a 403/404:
- Going to the proxy url in the browser should help you understand what’s going on, in my case – getting 403 – I needed to add this line ‘config.hosts << “dev-store.myshopify.com”’ to ‘/config/environments/development.rb’ in Rails
- Try different names for the “Subpath” if you are getting 404, the name that worked for me is ‘xoxo-1’
hopefully I can change it soon, but for now it’s working!
In my case what helped – before I try the full proxy URL in the browser – was adding a ‘.catch’ to the JS request:
axios.get("/apps/xoxo-1")
.then((res) => { console.log('API response to proxy request: ', res) })
.catch((error) => {
if (error.response) {
console.log(error.response.data);
console.log(error.response.status);
console.log(error.response.headers);
} else if (error.request) {
console.log(error.request);
} else {
console.log('Error', error.message);
}
});
I hope that help!