From 6829edde7928fd4c66479b751c3c4d4269dc106f Mon Sep 17 00:00:00 2001 From: Jamon Camisso Date: Thu, 15 Feb 2024 20:36:54 -0500 Subject: [PATCH] Add cache-control header to nginx for html files (#1374) Signed-off-by: Jamon Camisso --- nginx.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nginx.conf b/nginx.conf index 98853e5425..337f837b22 100644 --- a/nginx.conf +++ b/nginx.conf @@ -99,6 +99,10 @@ http { rewrite ^ /vulnerabilities/index.html break; } + location ~* /(\index.html)?$ { + add_header Cache-Control "public, max-age=300, stale-while-revalidate=300"; + } + # use hugo's built in 404 page for now error_page 404 /404.html;