48 lines
1.6 KiB
ApacheConf
48 lines
1.6 KiB
ApacheConf
<FilesMatch "\.(ttf|otf|eot|woff|woff2|svg)$">
|
|
<IfModule mod_headers.c>
|
|
Header set Access-Control-Allow-Origin "*"
|
|
</IfModule>
|
|
</FilesMatch>
|
|
|
|
|
|
<IfModule mod_expires.c>
|
|
# Enable expires
|
|
ExpiresActive On
|
|
|
|
# Default a cache expiration
|
|
ExpiresDefault "access plus 10 month"
|
|
|
|
# Images
|
|
ExpiresByType image/gif "access plus 1 month"
|
|
ExpiresByType image/png "access plus 1 month"
|
|
ExpiresByType image/jpg "access plus 1 month"
|
|
ExpiresByType image/jpeg "access plus 1 month"
|
|
|
|
# CSS, JavaScript
|
|
ExpiresByType text/css "access plus 1 year"
|
|
ExpiresByType application/javascript "access plus 1 year"
|
|
ExpiresByType text/javascript "access plus 1 year"
|
|
|
|
|
|
# Fonts
|
|
# Add correct content-type for fonts
|
|
AddType application/vnd.ms-fontobject .eot
|
|
AddType application/x-font-ttf .ttf
|
|
AddType application/x-font-opentype .otf
|
|
AddType application/x-font-woff .woff
|
|
AddType image/svg+xml .svg
|
|
|
|
# Compress compressible fonts
|
|
# only uncomment if you dont have compression turned on already. Otherwise it will cause all other filestypes not to get compressed
|
|
# AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-opentype image/svg+xml
|
|
|
|
ExpiresActive on
|
|
|
|
# Add a far future Expires header for fonts
|
|
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
|
|
ExpiresByType application/x-font-ttf "access plus 1 year"
|
|
ExpiresByType application/x-font-opentype "access plus 1 year"
|
|
ExpiresByType application/x-font-woff "access plus 1 year"
|
|
ExpiresByType image/svg+xml "access plus 1 year"
|
|
</IfModule>
|