You  need to add this code (header(‘Access-Control-Allow-Origin: *’);) in this path (/public_html/application/libraries/rest_controller.php).