Open maxfontana90 opened 5 years ago
@maxfontana90 I will look into that
In case someone is curious.
The following mock file can be used as a catch all for all OPTION calls going to the API:
{ "name": "options", "request": { "url": "/api", "method": "OPTIONS" }, "responses": { "200": { "status": 200, "data": {}, "default": true } } }
Sorry to come in late, but I fixed this by adding the cors middleware to my express app that bootstraps ng-apimock
Currently, the api mock server its running on a different port when compared to the SPA Im trying to test with Protractor. Proxying API requests is not an option in my case.
Please add the ability to support OPTIONS http request methods so that preflight requests succeed.