From d5cc55867064306b2807b3af3d33e6e21466cb55 Mon Sep 17 00:00:00 2001 From: wiz Date: Mon, 8 Mar 2021 18:50:21 +0900 Subject: [PATCH] Modify nginx.conf to cache HTML for 10m and static resources for 1h Fixes #61 --- production/nginx-mempool.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/production/nginx-mempool.conf b/production/nginx-mempool.conf index 3c11c0e6e..b9be208a6 100644 --- a/production/nginx-mempool.conf +++ b/production/nginx-mempool.conf @@ -34,6 +34,13 @@ # fallback for all URLs i.e. /address/foo /tx/foo /block/000 location / { try_files /$lang/$uri /$lang/$uri/ $uri $uri/ /en-US/$uri @index-redirect; + add_header Cache-Control "public, no-transform"; + expires 10m; + } + location /resources { + try_files /$lang/$uri /$lang/$uri/ $uri $uri/ /en-US/$uri @index-redirect; + add_header Cache-Control "public, no-transform"; + expires 1h; } location @index-redirect { add_header vary accept-language;