add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';添加完之后,重启nginx
Header set Access-Control-Allow-Origin "*"如果网站开启了ssl,注意有两处需要添加代码
Header set Access-Control-Allow-Origin "*"添加完之后,重启apache