BNDong / Cnblogs-Theme-SimpleMemory

🍭 Cnblogs theme _ Basic theme : SimpleMemory

Home Page:https://bndong.github.io/Cnblogs-Theme-SimpleMemory/v2.1/dist/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

用自己的oss存储dist后,博客打开字体不能正常显示

hsh778205 opened this issue · comments

用自己的oss(阿里云)存了dist,然后按照https://bndong.github.io/Cnblogs-Theme-SimpleMemory/v2/#/Docs/Guide/cdn这里的教程修改了“博客侧边栏公告”中的内容。

能够正常显示大部分内容,但是还有很多问题比如字体等

image

变回了普通的字体

控制台报错:

image

Access to font at 'https://vanilla-picture-with-picgo.oss-cn-shenzhen.aliyuncs.com/dist/fonts/7840367fef8abb3b9f8a.woff2' from origin 'https://www.cnblogs.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

百度了一下是说跨域问题:浏览器出于安全考虑,限制访问本站点以为的资源。

我是前后端小白,所以来请教一下各位大佬。谢谢!

commented

对象存储/Bucket 列表/{你的bucket}/数据安全/跨域设置

@BNDong 您好,我这样设置可以吗?
image

噢我勾选了最后一个返回Vary:Origin之后 字体就正常了!

谢谢!