about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNguyễn Gia Phong <cnx@loang.net>2023-07-30 11:18:18 +0900
committerNguyễn Gia Phong <cnx@loang.net>2023-07-30 11:18:18 +0900
commit9b8c18d5ca3dd55daff999a5799b81298ff499a0 (patch)
treebccac3b82fc2da61cb13dbe11bceaedbe326af6b
parent6c4e4f5e27917636106ca0de7856653b15ccc42e (diff)
downloadnixos-conf-9b8c18d5ca3dd55daff999a5799b81298ff499a0.tar.gz
Disable caching for element where appropriate
-rw-r--r--matrix.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/matrix.nix b/matrix.nix
index a524b95..55b32cd 100644
--- a/matrix.nix
+++ b/matrix.nix
@@ -95,6 +95,17 @@ in {
       "than.${domain}" = {
         enableACME = true;
         forceSSL = true;
+        locations = let
+          noCache = {
+            extraConfig = ''
+              add_header Cache-Control "no-cache";
+            '';
+          };
+        in {
+          "/index.html" = noCache;
+          "/version" = noCache;
+          "/config" = noCache;
+        };
         root = pkgs.element-web.override {
           conf = {
             default_server_config = client;