Search code examples
corsicenium

implementing CORS in API for native app


I'm using Icenium to develop a native app. Currently just built one sample hybrid application using icenium (www.icenium.com) to call API using jQuery ajax, but still getting some errors saying "Possible CORS error!" in Icenium.

I've read through how I can implement CORS headers to allow cross domain ajax, however seems it is still not working in my native app built through icenium.

Here's my response header:

Content-Length: 76 
X-Xss-Protection: 1; mode=block
Content-Language: en 
X-Content-Type-Options: nosniff
Status_code: 200
Vary: Accept-Language, Cookie 
Allow: GET, POST 
Date: Sun, 01 Dec 2013 07:41:33 GMT 
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Content-Type
Content-Type: application/json 
X-Frame-Options: SAMEORIGIN

Does any one see any problems?


Solution

  • I found the problem. Problem was the API server for testing didn't had valid SSL cert, so was failing. I changed the request to http and solved the problem.