Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

CORS error with AJAX filter

CORS error with AJAX filter

developerDan
Shopify Partner
2 0 0

Hi all,

 

I built a vue.js app to make an API call any time someone clicks on the filters for a collection. I'm getting a CORS error and I understand why, but what I want to know is how to solve it. I know I'm supposed to use a Shopify proxy app but honestly I'm quite lost when trying to set it up. I also don't know how that'll work in terms of the API call I'm making. Does that mean I have to change the url in the API call? Or will the proxy reroute it?

 

None of this is clear to me and I've spent the last day and a half trying to make heads or tails of the documentation on this but I feel like I'm stuck on the simple parts of setting it up and connecting it to my store. I get the app in the Partners page but I don't know where to get a proxy server or what to do when I have one to make sure it's work

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 524

Hi developerDan,

 

If the [App Proxy info in the Dev Docs] isn't helping maybe [this article on Medium] will be useful as it describes App Proxies in a slightly different way.

 

One thing that comes to mind to ask about is what sort of API call you're intending to make and having trouble with, as generally the App Proxy is used to route calls to an external server as opposed to directly making API calls to a store's internal resources.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog