From fc391169da695723352bc6e0ed60118d02d978a7 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 23 Mar 2026 17:40:10 +0100 Subject: [PATCH] Update nginx default config around caching (#32884) * Update nginx default config around caching Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update README around caching Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- apps/web/README.md | 3 +-- apps/web/docker/nginx-templates/default.conf.template | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/web/README.md b/apps/web/README.md index b84ba0d44e..c0683d7017 100644 --- a/apps/web/README.md +++ b/apps/web/README.md @@ -101,8 +101,7 @@ Element requires the following URLs not to be cached, when/if you are serving El ``` /config.*.json /i18n -/home -/sites +/version /index.html ``` diff --git a/apps/web/docker/nginx-templates/default.conf.template b/apps/web/docker/nginx-templates/default.conf.template index b4690ce146..964e7f2933 100644 --- a/apps/web/docker/nginx-templates/default.conf.template +++ b/apps/web/docker/nginx-templates/default.conf.template @@ -6,7 +6,7 @@ server { root /usr/share/nginx/html; index index.html; - # Set no-cache for the version, config and index.html + # Set no-cache for the version, config, i18n, and index.html # so that browsers always check for a new copy of Element Web. # NB http://your-domain/ and http://your-domain/? are also covered by this @@ -16,6 +16,10 @@ server { location = /version { add_header Cache-Control "no-cache"; } + location /i18n/ { + add_header Cache-Control "no-cache"; + } + # covers config.json and config.hostname.json requests as it is prefix. location /config { root /tmp/element-web-config;