Added CORS support for the API.