3

I have an Angular 2 webapp compiled to Android with Ionic.

This app is making requests to my server and my server is configured with access-control-allow-origin:* and all is working fine.

As installed app, all requests are to a external domain, but once configured CORS I don't want duplicated Angular 2 requests using preflight OPTION to check CORS.

All my requests are sent two times, first as OPTION (check) and then as GET and is a huge performance issue to a regular app usage.

How can I disable preflight OPTIONS requests on Angular 2?

duplicated requests

Requests from "polyfills.js" are preflight OPTIONS.

Regards.

Lito
  • 1,262
  • 2
  • 17
  • 25
  • 1
    http://stackoverflow.com/questions/22968406/how-to-skip-the-options-preflight-request-in-angularjs as per this, change content-type to anything but application/json. – DesTroy May 19 '17 at 18:01

0 Answers0