by Juan Leyva.
Hi,
CORS is supported only by the REST simple server (REST protocol using tokens for authentication). I think it is supported since Moodle 3.1.
You don't have to do anything special.
You can check the Mobile app code (although is a large base code, they are standard AJAX/XHR requets using Angular http service)
Juan