Use ETags instead of Last-Modified for caching

This commit is contained in:
Luka Korošec 2025-08-08 21:52:12 +02:00
parent f2f8efdc1d
commit c7a4d2fe0c
Signed by: Pizmovc
GPG key ID: 4E1338930C2F3572
2 changed files with 17 additions and 2 deletions

View file

@ -7,7 +7,12 @@ in
enable = true;
# Needs `http://` prefix so that it does not try to request TLS certificates and redirect to 443
virtualHosts."http://${site-url}".extraConfig = ''
file_server
header {
-Last-Modified
}
file_server {
etag_file_extensions .etag
}
root * ${inputs.our-site.packages."${pkgs.system}".default}
encode gzip
'';