Skip to content

Commit 1f1117c

Browse files
authored
Merge pull request #277 from terrestris/prevent-caching
Apply no-cache headers
2 parents 15cb6f0 + 5174e96 commit 1f1117c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

shogun-nginx/prod/default.conf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,21 @@ server {
9191
location /admin/config/admin-client-config.js {
9292
root /usr/share/nginx/html/;
9393

94+
add_header Cache-Control "no-cache, no-store, must-revalidate, proxy-revalidate, max-age=0";
95+
add_header Pragma "no-cache";
96+
add_header Expires "0";
97+
9498
ssi on;
9599
ssi_types application/javascript;
96100
set $keycloakhost ${KEYCLOAK_HOST};
97101
}
98102

99103
location /admin/modelconfigs {
100104
root /usr/share/nginx/html/;
105+
106+
add_header Cache-Control "no-cache, no-store, must-revalidate, proxy-revalidate, max-age=0";
107+
add_header Pragma "no-cache";
108+
add_header Expires "0";
101109
}
102110

103111
location /client/ {
@@ -113,6 +121,10 @@ server {
113121
location /client/gis-client-config.js {
114122
root /usr/share/nginx/html/;
115123

124+
add_header Cache-Control "no-cache, no-store, must-revalidate, proxy-revalidate, max-age=0";
125+
add_header Pragma "no-cache";
126+
add_header Expires "0";
127+
116128
ssi on;
117129
ssi_types application/javascript;
118130
set $keycloakhost ${KEYCLOAK_HOST};
@@ -121,6 +133,13 @@ server {
121133
# location /client-plugins/ {
122134
# proxy_pass http://shogun-client-plugins/;
123135

136+
# proxy_no_cache 1;
137+
# proxy_cache_bypass 1;
138+
139+
# add_header Cache-Control "no-cache, no-store, must-revalidate, proxy-revalidate, max-age=0";
140+
# add_header Pragma "no-cache";
141+
# add_header Expires "0";
142+
124143
# proxy_set_header Host $host;
125144
# proxy_set_header X-Real-IP $remote_addr;
126145
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

0 commit comments

Comments
 (0)