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:
committed by
GitHub
parent
bb1d376d5d
commit
fc391169da
+1
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user