错误一
XMLHttpRequest cannot load https://test.com/ws/target. The 'Access-Control-Allow-Origin' header contains multiple values 'https://a.com, *', but only one is allowed. Origin 'https://a.com' is therefore not allowed access.
错误二
XMLHttpRequest cannot load https://api.growingio.com/v2/zzzaaa/web/action?stm=1489659172277. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'https://a.com' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute.
可否截图看下具体的报错信息
我也遇到一样的问题,提问的人已经写的很清楚了,控制台打印的就是那些。核心内容就是 A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true.
单问题是服务端根本没有返回 Access-Control-Allow-Origin '*' ,而是直接返回的前端页面的域名