一、nginx伺服器解決方法
伺服器使用的是nginx,要在回應的頭部添加access-control-allow-origin 字段,新增方法是用add_header 指令:
設定範例:
複製程式碼 程式碼如下:
location /assets/ {
gzip_static on;
expires max;
add_## expires max;
add_## public;
add_header access-control-allow-origin *;
二、apache伺服器解決方法
font awesome (firefox無法顯示)cross domain (跨域問題)the problem
it seems that, for security reasons, firefox simply don't allow you to use by default a font that is not hosted on your domain, not even on your subdomain. the cdn based websites can be also affected in this case.the Vution##vestf ##fations#fations , i found out the workaround: set a access-control-allow-origin header to the font.
複製程式碼 程式碼如下:
#
header set access-control-allow-origin "*"
複製代碼 代碼如下:
add_header access-control-allow-origin *;
}#
以上是Apache/Nginx下Font Awesome在Firefox中不顯示怎麼解決的詳細內容。更多資訊請關注PHP中文網其他相關文章!