Webapp produces CORS errors when retrieving data from ONTAP RESTAPI
Applies to
- ONTAP
- RESTAPI
- Cross-Origin Resource Sharing (CORS)
Issue
- During development of a webapp using the ONTAP REST API, all requests fail with CORS related errors (Seen from the browser developer console):
Access to XMLHttpRequest at 'http://cluster1.example.com/api/storage/volumes' from origin 'http://localhost' has been blocked by CORS policy
- Same request work from other sources (Postman, curl, swagger-ui,...)