CORS in Ionic View

I am making a GET request in my app, and I understand the CORS issue when using ionic serve, but I think I am having the same issue when using Ionic View, I receive the error Response with status: 0 for URL: null

Do you think this is a CORS issue, and how do I make http requests in Ionic View?



Ionic View Pro has stricter handling of CORS (WKWebView), as compared to Ionic View legacy.

Your error makes me defintely think of CORS, which will be difficult to solve using the components you are using now, without chanigng the server endpoint.



Thanks for the reply.
It’s a shame that Ionic View is strict with CORS, I can see that being an issue, it would be good to be able to use a potential client’s site to populate a sample app to show them.
You said “using the components you are using now”, do you have some components in mind that would make it easier?

1 Like


Well that would be things like building your own plugin, webview etc. So moving away from the ionic/angular layer. Not an obvious choice for me.

As to ionic view, it was recommended to me to raise a ticket @ ionic support so they can measure the communities’ need for different handling. This I did and maybe something others want to do too. @mattkremer



You can also put a simple proxy backend app in between if this is a common thing for you.

Thanks Tom, I’ll do that.

Do you mean sending requests from the app to my own server, which in turn sends it to the actual end point I am after? Yes I had thought that might be an option, thanks.

Exactly. If the data is public anyway, there are hosted proxies for that out there.