From 2a7d951f619d7cc1dd71134f3528ac4dcefd1c30 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Wed, 23 Oct 2024 14:20:45 +0200 Subject: [PATCH 1/2] 2773: Add no-cache directive --- .docker/vhost.conf | 4 ++++ .../itkdev/etc/confd/templates/default.conf.tmpl | 10 ++++++++++ .../os2display/etc/confd/templates/default.conf.tmpl | 10 ++++++++++ 3 files changed, 24 insertions(+) diff --git a/.docker/vhost.conf b/.docker/vhost.conf index 49dbc642..e48754e5 100644 --- a/.docker/vhost.conf +++ b/.docker/vhost.conf @@ -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 { diff --git a/infrastructure/itkdev/etc/confd/templates/default.conf.tmpl b/infrastructure/itkdev/etc/confd/templates/default.conf.tmpl index 658ee1ed..3dea9060 100644 --- a/infrastructure/itkdev/etc/confd/templates/default.conf.tmpl +++ b/infrastructure/itkdev/etc/confd/templates/default.conf.tmpl @@ -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; } diff --git a/infrastructure/os2display/etc/confd/templates/default.conf.tmpl b/infrastructure/os2display/etc/confd/templates/default.conf.tmpl index 658ee1ed..3dea9060 100644 --- a/infrastructure/os2display/etc/confd/templates/default.conf.tmpl +++ b/infrastructure/os2display/etc/confd/templates/default.conf.tmpl @@ -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; } From 1466f0980b6f70a47f568d1fc0c52019cf59830d Mon Sep 17 00:00:00 2001 From: turegjorup Date: Wed, 23 Oct 2024 14:22:23 +0200 Subject: [PATCH 2/2] 2773: Update Changelog --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5753aa1c..d786d266 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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`