From 0b92d1a576d8c559c61441f0800dc917669ec48e Mon Sep 17 00:00:00 2001 From: Sahiba Mittal Date: Mon, 27 Jan 2025 11:11:57 +0000 Subject: [PATCH] Fix caching issues upon upgrade Co-Authored-By: Niklas --- docker/etc/nginx/conf.d/default.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docker/etc/nginx/conf.d/default.conf b/docker/etc/nginx/conf.d/default.conf index 4b2346bf..2baaf46b 100644 --- a/docker/etc/nginx/conf.d/default.conf +++ b/docker/etc/nginx/conf.d/default.conf @@ -6,6 +6,15 @@ server { root /opt/owasp/dependency-track-frontend; index index.html; try_files $uri $uri/ /index.html; + + location ~ (config\.json|index\.html)$ { + add_header Cache-Control "max-age=0, no-cache, no-store, must-revalidate"; + add_header Pragma "no-cache"; + add_header Expires 0; + } + + sub_filter '