From f2ebb3fe5cd51bd1caf4f83ab85aa58422f47580 Mon Sep 17 00:00:00 2001 From: Moritz 'e1mo' Fromm Date: Thu, 13 Apr 2023 14:56:49 +0200 Subject: [PATCH] Set longer cache duration for fonts Since they are versioned, we can be a bit more liberal with the stated cache duration. --- services/website.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/website.nix b/services/website.nix index a3c2ea4..5bcdab1 100644 --- a/services/website.nix +++ b/services/website.nix @@ -41,6 +41,10 @@ in { serverAliases = [ "www.${baseDomain}" ]; root = webroot; locations = { + # A ?version= is appeneded to the font files, so we can be quite liberal + "/theme/fonts/open-sans/fonts/".extraConfig = '' + expires 1M; + ''; "/".extraConfig = '' log_not_found off; error_page 404 /404.html;