First, the Nginx server solves the method
The server is using Nginx, to add the Access-control-allow-origin field to the head of the response, add the method by using the Add_header directive:
Configuration Example:
Copy Code code as follows:
location/assets/{
Gzip_static on;
Expires Max;
Add_header Cache-control public;
Add_header Access-control-allow-origin *;
}
Two, the Apache server solves the method
Font Awesome (Firefox cannot show Firefox cannot be displayed) Cross domain (cross-domain issue)
The problem
It seems that, for the security reasons, Firefox simply don ' t allow your to use by default a font, isn't, hosted on your do Main, not even on your subdomain. The CDN based websites can be also affected in this case.
The solution
After some investigations, I found out of the Workaround:set a access-control-allow-origin header to the font.
Copy Code code as follows:
<filesmatch "\. (Ttf|otf|eot|woff) $ ">
<ifmodule mod_headers.c>
Header set Access-control-allow-origin "*"
</IfModule>
</FilesMatch>
Also, if you are using Nginx as your webserver your'll need to include the code below in your virtual host file:
Copy Code code as follows:
Location ~* \. (Eot|otf|ttf|woff) $ {
Add_header Access-control-allow-origin *;
}