diff --git a/CHANGELOG.md b/CHANGELOG.md index c2b141c5b..0b28b4e01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ ### Pending Release +### v4.4.2 - 2024-10-02 + +- :rocket: `API` Start to make improvements to caching behavior on initial load + ### v4.4.1 - 2024-10-01 - :bug: `API` Set `useCache=true` when making Group List calls diff --git a/api/nginx.conf b/api/nginx.conf index 3241eab46..74a27272c 100644 --- a/api/nginx.conf +++ b/api/nginx.conf @@ -39,16 +39,29 @@ http { set $CONNECT "connect-src 'self' *.API_URL:* *.ROOT_URL:*"; add_header 'Content-Security-Policy' "default-src 'self' *.API_URL; ${IMG}; ${WORKER}; ${CONNECT}; ${STYLE_SRC_ATTR}; ${STYLE_SRC_ELEM}; ${FONT}; upgrade-insecure-requests;" always; + location = / { + add_header 'X-Content-Type-Options' 'nosniff' always; + add_header 'X-Frame-Options' 'DENY' always; + add_header 'Referrer-Policy' 'strict-origin-when-cross-origin' always; + add_header 'Strict-Transport-Security' 'max-age=31536000; includeSubDomains; preload' always; + add_header 'Permissions-Policy' 'fullscreen=(self), geolocation=(self), clipboard-read=(self), clipboard-write=(self)' always; + add_header 'Content-Security-Policy' "default-src 'self' *.API_URL; ${IMG}; ${WORKER}; ${CONNECT}; ${STYLE_SRC_ATTR}; ${STYLE_SRC_ELEM}; ${FONT}; upgrade-insecure-requests;" always; + + add_header 'Cache-Control' 'no-store, no-cache, must-revalidate' always; + add_header 'Expires' 0 always; + add_header 'Pragma' 'no-cache' always; + + alias /home/etl/api/web/dist/; + try_files /index.html =404; + } + location / { if ($request_uri ~ ^/(.*)\.html) { return 302 /$1; } alias /home/etl/api/web/dist/; - try_files $uri $uri.html $uri/ /index.html; - - autoindex on; } location /docs/ { diff --git a/package-lock.json b/package-lock.json index ab7a55523..0af40c90b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tak-ps/CloudTAK", - "version": "4.4.1", + "version": "4.4.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@tak-ps/CloudTAK", - "version": "4.4.1", + "version": "4.4.2", "license": "ISC", "dependencies": { "@openaddresses/batch-alarms": "^4.0.0", diff --git a/package.json b/package.json index f774874f0..ac738c663 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@tak-ps/CloudTAK", "type": "module", - "version": "4.4.1", + "version": "4.4.2", "description": "Facilitate ETL operations to bring non-TAK sources into a TAK Server", "scripts": { "lint": "eslint cloudformation/**/*.js",