Configure CORS

Configuring Cross-Origin Resource Sharing (CORS) is only required if the API is being called from a browser app hosted on a different domain. For example, if your single-page JavaScript app is on example.com, but your API is hosted on api.example.com, you need to enable CORS.