This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

cinny.nix: cache-control so app updates show on reload

Nix store files have mtime=1970 and the vhost set no Cache-Control, so a
browser can heuristically cache index.html for a long time and not pick
up a newly deployed build on reload. Serve index.html with no-cache
(revalidated cheaply via etag) and the content-hashed /assets/ with a
long immutable max-age.

Assisted-by: Claude Code (claude-opus-4-8[1m])

+14 -2
+14 -2
2configs/services/matrix/cinny.nix
··· 17 17 }; 18 18 in 19 19 { 20 - services.nginx.virtualHosts."matrix.lassul.us".locations."/" = { 20 + services.nginx.virtualHosts."matrix.lassul.us" = { 21 21 root = cinny-threads; 22 - tryFiles = "$uri /index.html"; 22 + locations = { 23 + "/".tryFiles = "$uri /index.html"; 24 + # Store files have mtime=1970; without an explicit Cache-Control a browser 25 + # may heuristically cache the entry HTML for a long time and not pick up a 26 + # new build on reload. Force revalidation of index.html (cheap via etag), 27 + # and let the content-hashed assets cache hard. 28 + "= /index.html".extraConfig = '' 29 + add_header Cache-Control "no-cache"; 30 + ''; 31 + "/assets/".extraConfig = '' 32 + add_header Cache-Control "public, max-age=31536000, immutable"; 33 + ''; 34 + }; 23 35 }; 24 36 }