0

I can not solve this error. I try with:

https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi

https://github.com/apache/cordova-plugin-whitelist

adding headers

  • Access-Control-Allow-Headers : "*"
  • Access-Control-Allow-Methods : "GET, POST, OPTIONS, PUT, PATCH, DELETE"
  • Access-Control-Allow-Origin : "*"

And It did not work.

Please help

enter image description here

Alex Quintero
  • 1,160
  • 10
  • 21

2 Answers2

1

can you provide more details about your question?

4xx is client error, 405 maybe a GET request on a form which requires data to be presented via POST, or a PUT request on a read-only resource.

So can you check whether your request type is wrong?

Linerd
  • 91
  • 1
  • 8
  • Aggregate failed request @Linerd – Alex Quintero May 02 '16 at 22:06
  • @AlexQuintero I see your requestTravelAllCustomers request seems to be "OPTIONS" in your error log, and I find someone else already post the solution which may help you: http://stackoverflow.com/questions/33660712/angularjs-post-fails-response-for-preflight-has-invalid-http-status-code-404, hope it works for you – Linerd May 03 '16 at 07:35
0

the problem is not with whitelist

  • make sure you are not posting from your service(post from your controller)

  • make sure your server responds with a 200 status code when the response is options

nipek
  • 810
  • 1
  • 9
  • 22