xampp设置Access-Control-Allow-Origin:
修改apache配置
vim /opt/lampp/etc/httpd.conf

<Directory "/opt/lampp/htdocs">
......
  AllowOverride All
  Header set Access-Control-Allow-Origin *
  #Header set Access-Control-Allow-Origin https://www.google.com,https://www.baidu.com
 ......
</Directory>  

重启xampp
/opt/lampp/lampp restart