From 7a9c496f0283f7e0340e06557545040c8221f474 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Sun, 25 Jan 2026 16:12:47 +0100 Subject: [PATCH] site: cache fonts --- hosts/thegeneralist-central/site.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hosts/thegeneralist-central/site.nix b/hosts/thegeneralist-central/site.nix index ff2f95c..538f1ad 100644 --- a/hosts/thegeneralist-central/site.nix +++ b/hosts/thegeneralist-central/site.nix @@ -61,11 +61,16 @@ in extraConfig = '' absolute_redirect off; - location ~* \.(html|css|js|jpg|jpeg|png|gif|svg|ico|woff2?)$ { + location ~* \.(html|css|js|jpg|jpeg|png|gif|svg|ico)$ { expires 1d; add_header Cache-Control "public"; } + location ~* \.(ttf|woff2?)$ { + expires 1y; + add_header Cache-Control "public, immutable"; + } + error_page 404 /404.html; ''; };