Skip to content

Instantly share code, notes, and snippets.

@bouveng
Last active June 9, 2020 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bouveng/75d4593ad1e518d3d84a4933de12faf6 to your computer and use it in GitHub Desktop.
Save bouveng/75d4593ad1e518d3d84a4933de12faf6 to your computer and use it in GitHub Desktop.
<filesMatch ".(ico|pdf|flv|jpg|jpeg|png|webp|svg|gif|woff|woff2|js|css)$">
Header set Cache-Control "max-age=31536000, public"
Header append Vary: Accept-Encoding
Header set Access-Control-Allow-Origin “*”
</filesMatch>
<ifmodule mod_deflate.c>
<ifmodule mod_mime.c>
AddType application/x-font-ttf .ttf
AddType application/font-woff .woff
AddType application/font-woff2 .woff2
AddType image/svg+xml .svg .svgz
</ifmodule>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css image/svg+xml application/x-javascript application/javascript text/text application/x-font-ttf application/font-woff application/font-woff2
</ifmodule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/jpg A31536000
ExpiresByType image/svg+xml A31536000
ExpiresByType image/gif A31536000
ExpiresByType image/jpeg A31536000
ExpiresByType image/png A31536000
ExpiresByType text/css A31536000
ExpiresByType text/javascript A31536000
ExpiresByType application/javascript A31536000
ExpiresByType image/ico A31536000
ExpiresByType image/x-icon A31536000
ExpiresByType application/font-woff A31536000
ExpiresByType application/font-woff2 A31536000
ExpiresByType application/x-font-ttf A31536000
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment