From 4dc4c5fb048d12eed10282f092779a6fe7a26f47 Mon Sep 17 00:00:00 2001 From: Bipul Adhikari Date: Tue, 11 Oct 2022 14:10:11 +0545 Subject: [PATCH] Update Nginx cache configuration Signed-off-by: Bipul Adhikari --- default.conf | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/default.conf b/default.conf index 071ec94b2..e3a86f4cd 100644 --- a/default.conf +++ b/default.conf @@ -1,10 +1,3 @@ -map $sent_http_content_type $expires { - default off; - text/html epoch; - text/css max; - application/javascript epoch; -} - server { listen 9001 ssl; listen [::]:9001 ssl; @@ -21,5 +14,9 @@ server { root /usr/share/nginx/html; } ssi on; - expires $expires; + add_header Last-Modified $date_gmt; + add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; + if_modified_since off; + expires off; + etag off; }