Add in entry file
//Allowed source domains
header("Access-Control-Allow-Origin: *");
//Allowed request header information
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization");
//Allowed request types
header('Access-Control-Allow-Methods: GET, POST, PUT,DELETE,OPTIONS,PATCH');