Add the following code in your .htaccess file to execute the Cross-origin resource sharing (CORS).
Want to know more about .htaccess click here.
<IfModule mod_headers.c >
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET,PUT,POST,DELETE"
Header set Access-Control-Allow-Headers "Content-Type, Authorization"