Skip to content

Instantly share code, notes, and snippets.

@pitchart
Created December 27, 2016 09:48
Show Gist options
  • Save pitchart/d8099cf86346318238c5ff213db44e31 to your computer and use it in GitHub Desktop.
Save pitchart/d8099cf86346318238c5ff213db44e31 to your computer and use it in GitHub Desktop.
htaccess configuration for webfonts
# ----------------------------------------------------------------------
# Webfonts
# ----------------------------------------------------------------------
# allow access from all domains for webfonts
<FilesMatch "\.(ttf|otf|eot|woff|font.css)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
# mime types
AddType application/vnd.ms-fontobject eot
AddType font/truetype ttf
AddType font/opentype otf
AddType application/x-font-woff woff
# deflate :
<IfModule mod_deflate.c>
<FilesMatch "\.(ttf|otf|eot|svg)$" >
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment