Whom have worked with cross-origin HTTP requests knows that one of the actions to make this working is enable CORS in API’s webserver .
As I work with Nginx, the code that warns browsers (Firefox e Chrome) and allow pre-flight requests is presented below:
The flow of this browsers is: making a pre-flight request to test the webserver, before making the real request. The code above allow the cross-origin request flow goes ahead. You will need to implement this code between “location” block.