Created
September 17, 2013 19:58
-
-
Save 0xqd/6599735 to your computer and use it in GitHub Desktop.
font awesome and firefox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apache config | |
<FilesMatch ".(eot|ttf|otf|woff)"> | |
Header set Access-Control-Allow-Origin "*" | |
</FilesMatch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config.ru | |
# Allow font files to be loaded from anywhere (for loading webfonts in Firefox) | |
require 'rack/cors' | |
use Rack::Cors do | |
allow do | |
origins '*' | |
resource '/fonts/*', :headers => :any, :methods => :get | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nginx config | |
if ($filename ~* ^.*?\.(eot)|(ttf)|(woff)$){ | |
add_header Access-Control-Allow-Origin *; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment