在public目录下面的图片,怎么解决跨域问题

浏览:1796 发布日期:2019/01/23 分类:ThinkPHP5专区 关键字: 跨域
在前端网站读取public下的图片资源,存在跨域问题,不懂在哪设置才能前端网站才能访问。
前端网站读取报以下错误
Access to Image at 'http://www.a.com/mat_image/a9/3ec0a8f154461af7d06cfa317b4303.png' from origin 'http://www.b.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.b.com' is therefore not allowed access.
最佳答案
评论( 相关
后面还有条评论,点击查看>>