From 362c51edb258838fdf98932ef63baa76fb318f2e Mon Sep 17 00:00:00 2001 From: Quan Tran Date: Mon, 20 Mar 2023 17:29:17 +0700 Subject: [PATCH] Configure cache settings for Nginx Cache expires after 24h. After cache is expired, browser can compare ETag to the server to check if the file has changed. If the server returns the same token, then the file is the same, and there's no need to re-download it. (cherry picked from commit b511f2094f6961bd6d353b86cf8d0d065536d04f) --- server/nginx.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/nginx.conf b/server/nginx.conf index 8073c4157..08492dc8e 100644 --- a/server/nginx.conf +++ b/server/nginx.conf @@ -22,6 +22,8 @@ http { #tcp_nopush on; keepalive_timeout 65; + expires 86400; + etag on; include /etc/nginx/conf.d/*.conf;