Created
May 16, 2013 10:39
-
-
Save rickbenetti/5590836 to your computer and use it in GitHub Desktop.
Conjunto de regras para adicionar suporte à SVG e Web Fonts através de um arquivo .htaccess na raiz de cada projeto.
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
############################################ | |
## Fonts Support - for Apache Server ## | |
############################################ | |
<FilesMatch "\.(ttf|otf|eot|woff|font.css)$"> | |
<IfModule mod_headers.c> | |
Header set Access-Control-Allow-Origin "*" | |
</IfModule> | |
</FilesMatch> | |
# webfont mime types | |
AddType application/vnd.ms-fontobject eot | |
AddType font/truetype ttf | |
AddType font/opentype otf | |
AddType application/x-font-woff woff | |
# webfonts and svg: | |
<IfModule mod_deflate.c> | |
<FilesMatch "\.(ttf|otf|eot|svg)$" > | |
SetOutputFilter DEFLATE | |
</FilesMatch> | |
</IfModule> |
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
############################################ | |
## Fonts Support - for Nignx Server ## | |
############################################ | |
location ~* \.(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