From 23fca82f7f7c45dce94624d00d6992d250e11fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Fri, 23 Jul 2021 10:00:57 +0200 Subject: [PATCH 1/2] Avoid caching of the index.html page When updating to a newer GSA version the client's browser may still have an old version of that index.html file in its cache. In that case it wont load the new JavaScript files. Therefore don't cache all URLs where the index.html file is returned. This ensures the browers always loads the newest JavaScript files. (cherry picked from commit 023616077d8e916cdede769d8113e57078d3ced1) --- gsad/src/gsad_http_handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsad/src/gsad_http_handler.c b/gsad/src/gsad_http_handler.c index 47c5090973..f3529ad579 100644 --- a/gsad/src/gsad_http_handler.c +++ b/gsad/src/gsad_http_handler.c @@ -670,7 +670,7 @@ handle_index (http_connection_t *connection, const char *method, cmd_response_data_t *response_data; response_data = cmd_response_data_new (); - cmd_response_data_set_allow_caching (response_data, 1); + cmd_response_data_set_allow_caching (response_data, FALSE); response = file_content_response (connection, url, "index.html", response_data); From d2d0da266dcbc05bb48a38419101a0f613ca8874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Fri, 23 Jul 2021 10:09:17 +0200 Subject: [PATCH 2/2] Add changelog entry (cherry picked from commit ce3c35bf906e320527c3f57b5abfd0fd9e59735a) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71fa9c87e9..0fba2fdcd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,6 +103,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). * Changed default Content-Security-Policy (CSP) Header to `default-src 'self'; script-src 'self'; style-src-elem 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' blob:;` [#3068](https://github.com/greenbone/gsa/pull/3068) +* Avoid caching of the index.html file [#3082](https://github.com/greenbone/gsa/pull/3082) ### Deprecated ### Removed