踩坑惨状
平时微信分享配置文件都是后台配置好放到服务器上,前端直接引用,后续因业务需要,更改为可自定义分享内容,通过前端接收后台配置,来实现自定义分享,此时单纯的我还不知道,一个大坑正在前方等待着我的到来……
Access to XMLHttpRequest at 'http://map.museum.chaoxing.com/beacon/config?urlhttp://file.museum.chaoxing.com/frontendTest/standard/index.html#/' from origin 'http://file.museum.chaoxing.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
踩坑分析:
一脸懵逼的我谷歌百度齐上阵,博客文档翻起来,终于功夫不负