I am using ember-data in my app, however, I realize that Ember data will make two separated requests (for example a GET
and an OPTIONS
) to the server which of course takes a longer time than making a single request.
See screenshot below, the OPTIONS
requests take 1 second to complete and total 2 seconds for each user operation.
The code snippet below is what I used to fetch models in one particular route,
model() {
return this.store.findAll('card');
},
My question is why it makes two requests? and is this necessary to make an OPTIONS
request? If not how can I stop let my Ember data making OPTIONS
request?