]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/default.nix
Upgrade roundcube
[perso/Immae/Config/Nix.git] / modules / private / websites / default.nix
index aba30e37f73c2606c7c828ea90676e8fc8a31a7a..a3dcbb9c789a88d3afca424931bb95fd5bb348e8 100644 (file)
@@ -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 = ''
+        <If "%{HTTP:If-Modified-Since} =~ /01 Jan 1970 00:00:01/" >
+          RequestHeader unset If-Modified-Since
+        </If>
+        Header unset Last-Modified "expr=%{LAST_MODIFIED} < 19991231235959"
+      '';
+    };
     gzip = {
       modules = [ "deflate" "filter" ];
       extraConfig = ''