nixos/homer: add caching headers and compression to caddy vhost (#529447)

This commit is contained in:
Felix Bühler
2026-07-17 21:48:56 +00:00
committed by GitHub
+15 -1
View File
@@ -169,11 +169,25 @@ in
enable = true;
virtualHosts."${cfg.virtualHost.domain}".extraConfig = ''
root * ${cfg.package}
file_server
encode zstd gzip
@immutable path /resources/*
header @immutable Cache-Control "public, max-age=31536000, immutable"
@html not path /resources/*
header @html Cache-Control "no-store"
header {
-ETag
-Last-Modified
}
handle_path /assets/config.yml {
root * ${configFile}
file_server
}
file_server
'';
};
};