Skip to content

Commit 58eec3d

Browse files
authored
Serve "Cache-Control: no-cache" for non-bundled files. (#20489)
Most of the application is built into bundles with unique prefixes and can be ignored, but these files should be checked each load.
1 parent 7078373 commit 58eec3d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

nginx/conf.d/default.conf

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,20 @@ server {
66
root /usr/share/nginx/html;
77
index index.html;
88

9-
# Set no-cache for the index.html only so that browsers always check for a new copy of Element Web.
9+
# Set no-cache for the version, config and index.html
10+
# so that browsers always check for a new copy of Element Web.
11+
# NB http://your-domain/ and http://your-domain/? are also covered by this
12+
1013
location = /index.html {
1114
add_header Cache-Control "no-cache";
1215
}
13-
16+
location = /version {
17+
add_header Cache-Control "no-cache";
18+
}
19+
# covers config.json and config.hostname.json requests as it is prefix.
20+
location /config {
21+
add_header Cache-Control "no-cache";
22+
}
1423
# redirect server error pages to the static page /50x.html
1524
#
1625
error_page 500 502 503 504 /50x.html;

0 commit comments

Comments
 (0)