Skip to content

Commit

Permalink
Merge pull request #265 from os2display/feature/2773_no_cache
Browse files Browse the repository at this point in the history
2773: Add no-cache directive
  • Loading branch information
turegjorup authored Oct 23, 2024
2 parents ef3032c + 1466f09 commit 15c0c61
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .docker/vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ server {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://node:3000;

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

location /admin/ws {
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

- [#265](https://github.com/os2display/display-admin-client/pull/265)
- Bug in multiselect, fixed by removing duplicates by key both `@id`and `id`
- [#260](https://github.com/os2display/display-admin-client/pull/260)
- Bug in multiselect, fixed by removing duplicates by key both `@id`and `id`

- Bug in multiselect, fixed by removing duplicates by key both `@id`and `id`
- [#259](https://github.com/os2display/display-admin-client/pull/259)
- Add saving of playlists/groups with screen (as opposed to _after_)
- Clean up `screen-manager.jsx`
Expand Down
10 changes: 10 additions & 0 deletions infrastructure/itkdev/etc/confd/templates/default.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,22 @@ server {
# 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
10 changes: 10 additions & 0 deletions infrastructure/os2display/etc/confd/templates/default.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,22 @@ server {
# 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 15c0c61

Please sign in to comment.