Skip to content

Commit

Permalink
2773: Add no-cache directive
Browse files Browse the repository at this point in the history
  • Loading branch information
turegjorup committed Oct 23, 2024
1 parent a091da7 commit e0d56ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
12 changes: 4 additions & 8 deletions infrastructure/itkdev/etc/confd/templates/default.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,21 @@ server {
root /var/www/html;
index index.html index.htm;

add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
add_header Pragma "no-cache";
add_header Expires "0";

# Any route containing a file extension (e.g. /devicesfile.js)
location ~* ^{{ getenv "APP_ADMIN_CLIENT_PATH" "" }}/(.+\..+)$ {
rewrite ^{{ getenv "APP_ADMIN_CLIENT_PATH" "/" }}(.*) /$1 break;

add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
add_header Pragma "no-cache";
add_header Expires "0";

try_files $uri =404;
}

location ~* ^{{ getenv "APP_ADMIN_CLIENT_PATH" "/" }} {
rewrite ^{{ getenv "APP_ADMIN_CLIENT_PATH" "/" }}(.*) /$1 break;
autoindex off;

add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
add_header Pragma "no-cache";
add_header Expires "0";

try_files $uri /index.html;
}

Expand Down
12 changes: 4 additions & 8 deletions infrastructure/os2display/etc/confd/templates/default.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,21 @@ server {
root /var/www/html;
index index.html index.htm;

add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
add_header Pragma "no-cache";
add_header Expires "0";

# Any route containing a file extension (e.g. /devicesfile.js)
location ~* ^{{ getenv "APP_ADMIN_CLIENT_PATH" "" }}/(.+\..+)$ {
rewrite ^{{ getenv "APP_ADMIN_CLIENT_PATH" "/" }}(.*) /$1 break;

add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
add_header Pragma "no-cache";
add_header Expires "0";

try_files $uri =404;
}

location ~* ^{{ getenv "APP_ADMIN_CLIENT_PATH" "/" }} {
rewrite ^{{ getenv "APP_ADMIN_CLIENT_PATH" "/" }}(.*) /$1 break;
autoindex off;

add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
add_header Pragma "no-cache";
add_header Expires "0";

try_files $uri /index.html;
}

Expand Down

0 comments on commit e0d56ae

Please sign in to comment.