【发布时间】:2017-12-10 00:23:35
【问题描述】:
我在 Digital Ocean 上建立了一个网站 http://sugarcoated.co。该域名是通过 Hover 购买的。
此站点的 IP 地址是45.55.209.201
当我在浏览器中加载 IP 地址 http://45.55.209.201 时,所有字体都可以正常加载,但是当我加载 http://sugarcoated.co 时,我收到了 CORS 错误消息。
在以下位置访问字体 'http://45.55.209.201/wp-content/themes/sugarcoated/css/fonts/montserrat/montserrat-regular-webfont.woff2' 来自原点“http://sugarcoated.co”已被 CORS 策略阻止: 请求中不存在“Access-Control-Allow-Origin”标头 资源。因此不允许使用原点“http://sugarcoated.co” 访问。
我是服务器配置的新手,不确定我可能错过了哪个设置。
在悬停时,我已经像这样设置了域:
在Digital Ocean中,我的DNS记录如下:
【问题讨论】:
标签: wordpress hover cors cross-domain digital-ocean