Failing to answer to these requests may prevent your application from working. Luckily, Mockoon can handle this for you:
- Open the environment settings by clicking on the cog in the upper right corner:
Get Mockoon latest version and start mocking!
You may need to restart the environment for the changes to take effect.
Starting from now Mockoon will automatically answer with a 200 HTTP status code to all preflight OPTIONS requests. The following headers will also be added to the response:
Access-Control-Allow-Headers: Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With
Mockoon won’t send any CORS header if you define a route with the OPTIONS method in your environment (i.e.
OPTIONS /my-route), leaving you in full control of the headers you want to add.
Join Mockoon's mailing list to receive latest updates