chore(*): remove duplicate cache rule + cleanup cache headers; cleanup + formatting
This commit is contained in:
parent
425fed6ff6
commit
0e565970a5
42 changed files with 223 additions and 217 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 26 KiB |
|
@ -19,7 +19,7 @@
|
|||
src: url("/assets/fonts/dmi.woff2") format("woff2");
|
||||
font-weight: 100 700;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
font-display: optional;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
|
@ -8,7 +8,7 @@ excludeFromSitemap: true
|
|||
<opml version="1.0">
|
||||
<head>
|
||||
<title>OPML for all feeds in {{ globals.site_name }}'s blogroll</title>
|
||||
<dateCreated>{{ page.date | stringToRFC822Date }}</dateCreated>
|
||||
<dateCreated>{{ page.date | date: "%a, %d %b %Y %H:%M:%S %Z" }}</dateCreated>
|
||||
</head>
|
||||
<body>
|
||||
{%- for blog in blogroll -%}
|
||||
|
|
|
@ -101,11 +101,11 @@ RewriteRule .* /403/index.html [L,R=403]
|
|||
{%- endif %}
|
||||
|
||||
<IfModule mod_deflate.c>
|
||||
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json application/font-woff2
|
||||
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_brotli.c>
|
||||
AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/javascript application/json application/font-woff2
|
||||
AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/javascript application/json
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_expires.c>
|
||||
|
@ -113,25 +113,44 @@ RewriteRule .* /403/index.html [L,R=403]
|
|||
ExpiresDefault "access plus 1 month"
|
||||
ExpiresByType application/font-woff2 "access plus 1 year"
|
||||
ExpiresByType text/html "access plus 1 hour"
|
||||
ExpiresByType text/css "access plus 1 week"
|
||||
ExpiresByType application/javascript "access plus 1 week"
|
||||
ExpiresByType image/jpeg "access plus 1 month"
|
||||
ExpiresByType image/png "access plus 1 month"
|
||||
ExpiresByType image/gif "access plus 1 month"
|
||||
ExpiresByType image/svg+xml "access plus 1 month"
|
||||
ExpiresByType text/css "access plus 1 year"
|
||||
ExpiresByType application/javascript "access plus 1 year"
|
||||
ExpiresByType image/jpeg "access plus 1 year"
|
||||
ExpiresByType image/png "access plus 1 year"
|
||||
ExpiresByType image/gif "access plus 1 year"
|
||||
ExpiresByType image/svg+xml "access plus 1 year"
|
||||
ExpiresByType image/x-icon "access plus 1 year"
|
||||
ExpiresByType application/json "access plus 1 week"
|
||||
ExpiresByType application/octet-stream "access plus 1 month"
|
||||
ExpiresByType application/octet-stream "access plus 1 year"
|
||||
ExpiresByType font/ttf "access plus 1 year"
|
||||
ExpiresByType font/otf "access plus 1 year"
|
||||
ExpiresByType application/wasm "access plus 1 year"
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
<FilesMatch "\.(css|js|woff2)$">
|
||||
Header set Cache-Control "public, max-age=31536000"
|
||||
</FilesMatch>
|
||||
<FilesMatch "\.(html|htm)$">
|
||||
Header set Cache-Control "public, max-age=3600, must-revalidate"
|
||||
Header append Vary "Accept-Encoding"
|
||||
|
||||
<FilesMatch "\.(js|css|woff2|ttf|otf|png|jpg|jpeg|gif|svg|wasm|ico)$">
|
||||
Header set Cache-Control "public, max-age=31536000, immutable"
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_mime.c>
|
||||
AddType font/woff2 .woff2
|
||||
AddType font/ttf .ttf
|
||||
AddType font/otf .otf
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
|
||||
# use brotli if available
|
||||
RewriteCond %{HTTP:Accept-Encoding} br
|
||||
RewriteCond %{REQUEST_FILENAME}.br -f
|
||||
RewriteRule ^(.*)$ $1.br [QSA,L]
|
||||
|
||||
# fallback to gzip
|
||||
RewriteCond %{HTTP:Accept-Encoding} gzip
|
||||
RewriteCond %{REQUEST_FILENAME}.gz -f
|
||||
RewriteRule ^(.*)$ $1.gz [QSA,L]
|
||||
</IfModule>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue