I’m doing an app with ionic for android and ios, on android works fine, but on ios I have this problem:
The app is working with wordpress as backend, and I am using REST API, and JSON API, I need both because of some modifications in the wordpress (Not done by me) which make that some parts are more accesible with REST API an some WITH JSON API.
I have this two urls:
And also I have made some requests directly with PHP like this
The first one works nice, the second one give me error.
I thought that it was a CORS problem, after inspect the headers, I could see that where different, this are the headers:
date: Wed, 20 Dec 2017 17:07:46 GMT
access-control-allow-headers: Authorization, Content-Type
date:Wed, 20 Dec 2017 17:08:52 GMT
date:Wed, 20 Dec 2017 17:09:27 GMT
So I changed my htaccess with:
Header set Access-Control-Allow-Origin “*”
This make that 1 and 3 stop working and 2 works.
And the headers now have this line:
access-control-allow-origin: * ; *
Thanks in advance.