X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fdefault.nix;h=a3dcbb9c789a88d3afca424931bb95fd5bb348e8;hp=aba30e37f73c2606c7c828ea90676e8fc8a31a7a;hb=9271611c189a3ed4129d3b98422f86ab3f774f10;hpb=418a4ed7da43fab53c18f99237bc296e37f47d2c diff --git a/modules/private/websites/default.nix b/modules/private/websites/default.nix index aba30e3..a3dcbb9 100644 --- a/modules/private/websites/default.nix +++ b/modules/private/websites/default.nix @@ -3,6 +3,19 @@ let www_root = "/run/current-system/webapps/_www"; theme_root = "/run/current-system/webapps/_theme"; apacheConfig = { + cache = { + # This setting permits to ignore time-based cache for files in the + # nix store: + # If a client requires an If-Modified-Since from timestamp 1, then + # this header is removed, and if the response contains a + # too old Last-Modified tag, then it is removed too + extraConfig = '' + + RequestHeader unset If-Modified-Since + + Header unset Last-Modified "expr=%{LAST_MODIFIED} < 19991231235959" + ''; + }; gzip = { modules = [ "deflate" "filter" ]; extraConfig = ''