ctucx.git: nixfiles

ctucx' nixfiles

commit 4b5cdb9647f5b04a69b8f5f1964b5a36b0c155d1
parent 1513a5e435496bee4d7e9841116dec7067a85a93
Author: Leah (ctucx) <git@ctu.cx>
Date: Mon, 15 May 2023 19:27:50 +0200

machines/briefkasten/websites/photos.ctu.cx: disable caching for html files
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/machines/briefkasten/websites/photos.ctu.cx.nix b/machines/briefkasten/websites/photos.ctu.cx.nix
@@ -106,6 +106,13 @@ in {
       forceSSL   = lib.mkIf config.networking.usePBBUplink true;
       kTLS       = lib.mkIf config.networking.usePBBUplink true;
       root       = "/var/lib/ctucx-gallery";
+      locations."~* \.html$".extraConfig = ''
+        add_header Last-Modified $date_gmt;
+        add_header Cache-Control 'private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
+        if_modified_since off;
+        expires off;
+        etag off;
+      '';
     };
   };