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>
This commit is contained in:
Michael Telatynski
2026-03-23 17:40:10 +01:00
committed by GitHub
parent bb1d376d5d
commit fc391169da
2 changed files with 6 additions and 3 deletions
+1 -2
View File
@@ -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
```
@@ -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;