跨域报错解决
多亏了大佬 非常感谢
跨域报错
Access to image at 'https://www.123.com/123.jpg' from origin 'https://.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
解决方式
在网站的nginx配置增加
来源
add_header 'Access-Control-Allow-Origin' '*';
方法
add_header 'Access-Control-Allow-Methods' '*';
请求头
add_header 'Access-Control-Allow-Headers' '*';
一般只增加来源就行
好了!!