diff --git a/api/umami.php b/api/umami.php
index 534421d..8070da9 100644
--- a/api/umami.php
+++ b/api/umami.php
@@ -54,7 +54,6 @@ if ($method === 'GET' && preg_match('#^/utils\.js$#', $forwardPath)) {
http_response_code($code);
header('Content-Type: application/javascript; charset=UTF-8');
- header('Cache-Control: public, max-age=60');
echo $js;
exit;
}
diff --git a/package-lock.json b/package-lock.json
index dcc5eb7..b139761 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "coryd.dev",
- "version": "6.0.7",
+ "version": "6.0.8",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "coryd.dev",
- "version": "6.0.7",
+ "version": "6.0.8",
"license": "MIT",
"dependencies": {
"html-minifier-terser": "7.2.0",
diff --git a/package.json b/package.json
index a0959f7..d6d5e89 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "coryd.dev",
- "version": "6.0.7",
+ "version": "6.0.8",
"description": "The source for my personal site. Built using 11ty (and other tools).",
"type": "module",
"engines": {
diff --git a/src/meta/htaccess.liquid b/src/meta/htaccess.liquid
index 9364522..0917947 100644
--- a/src/meta/htaccess.liquid
+++ b/src/meta/htaccess.liquid
@@ -101,11 +101,11 @@ RewriteRule .* /403/index.html [L,R=403]
{%- endif %}
- 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
- 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
@@ -113,8 +113,8 @@ 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 text/css "access plus 1 month"
+ ExpiresByType application/javascript "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
@@ -128,10 +128,26 @@ RewriteRule .* /403/index.html [L,R=403]
-
- Header set Cache-Control "public, max-age=31536000"
-
-
- Header set Cache-Control "public, max-age=3600, must-revalidate"
-
+ Header append Vary "Accept-Encoding"
+
+
+ AddType font/woff2 .woff2
+ AddType font/ttf .ttf
+ AddType font/otf .otf
+
+
+
+ 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]
+
+