【发布时间】:2016-05-15 09:46:26
【问题描述】:
我的 Font Awesome 图标正在 Firefox 和 Safari 中加载,但在 Chrome 中没有。
在清除浏览器缓存并重新启动/重新加载 apache 之前,我已将以下几行添加到我的网络服务器的 .htaccess 文件中:
<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
这是检查告诉我的:
Font from origin 'https://www.portalpay.io' has been blocked from loading
by Cross-Origin Resource Sharing policy:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'https://portalpay.io' is therefore not allowed access.
我正在使用在 Digital Ocean Ubuntu 12.04 droplet 上运行的 WordPress 和 apache。我还尝试在 htaccess 中添加一些行,但这会阻止网站加载。
【问题讨论】:
-
我注意到apache一直在给我警告:AH00558
标签: css wordpress apache .htaccess font-awesome