CORS Multiple headers Issue

I have an Ionic 3 app in which I calling up wordpress api values from my website - my localhost Ionic server is telling me the following Failed to load https://www.example.com/wp-json/wp/v2/posts?categories=9&per_page=100: The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost:8100, *', but only one is allowed. Origin 'http://localhost:8100' is therefore not allowed access. I am wondering what the best practice is with this?

From the looks of your error message you may need to remove one of the values from 'http://localhost:8100, *' so that it becomes either 'http://localhost:8100' or '*'

Also, I had a similar issue once before, I remember that this article helped me:

https://blog.ionicframework.com/handling-cors-issues-in-ionic/

It talks about setting up a proxy for the app to be able to bypass CORS, but this shouldn’t be an issue when you come to running it on the actual device.

Hope this helps!
Good luck!