Boootstrap glyphicons Firefox issues

倖福魔咒の 提交于 2019-11-27 14:49:19

I had this issue, but serving bootstrap css from CDN solved it for me:

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">

Firefox has a strict setting(this) that prevents your HTML file from accessing your web fonts from folders not on the root. This only happens when you work locally and not from files on a server. You have to change a setting in Firefox to display the glyphicons when you develop locally.

-open "about:config" in your address in firefox

-Then search for "security.fileuri.strict_origin_policy" property and change it from "true" to "false". (ignore quotation marks of course)

It took me awhile to solve this one and my problem might be different from others as there are popular answers out there that just didn't work for me. That's because my problem and solution has to do with Amazon S3. So if you are using S3, read on.

The problem is the CORS (Cross-Origin Resource Sharing) configuration. Here's how to solve it:

Sign in to your S3 and open the bucket you are having the problem with. Click 'Properties' and then 'Permissions.' In the drop down click 'edit CORS configuration.' A window will pop up with code in a box that looks like this:

<CORSConfiguration>
    <CORSRule>
        <AllowedOrigin>*</AllowedOrigin>
        <AllowedMethod>GET</AllowedMethod>
        <MaxAgeSeconds>3000</MaxAgeSeconds>
        <AllowedHeader>Authorization</AllowedHeader>
    </CORSRule>
</CORSConfiguration>

Delete this line:

<AllowedHeader>Authorization</AllowedHeader>

Save it and refresh your Firefox page. Your icons should now appear!

Take a look at these links for more information as they helped me solve this: here and here and here. If anyone can offer more insight into why this works, please do!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!