baidu / amis

前端低代码框架,通过 JSON 配置就能生成各种页面。
https://baidu.github.io/amis/
Apache License 2.0
17.33k stars 2.51k forks source link

使用JSSDK方式访问ttf和woff文件报CORS错误 #118

Closed dotxu closed 5 years ago

dotxu commented 5 years ago

使用JSSDK方式时,jssdk会引用一些ttf和woff文件,这些文件位于“https://bce.bdstatic.com”域,所以报了CORS错误,详细如下

Access to font at 'https://bce.bdstatic.com/fex/amis-v2/n/font-awesome/fonts/fontawesome-webfont_af7ae50.woff2?v=4.7.0' from origin 'http://localhost:8080' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'http://amis.baidu.com' that is not equal to the supplied origin.

2betop commented 5 years ago

重新 cssdk 获取以下地址?我记得我已经修改了 字体文件的路径

dotxu commented 5 years ago

好使了,谢谢!