From 81d35d9401f102f9de9455953014272151a99f80 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com> Date: Sat, 15 Oct 2022 19:44:34 -0700 Subject: [PATCH] Update nginx cache settings for the frontend config files --- nginx-mempool.conf | 7 +++++++ production/nginx/server-common.conf | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/nginx-mempool.conf b/nginx-mempool.conf index a6f701478..d4f111d49 100644 --- a/nginx-mempool.conf +++ b/nginx-mempool.conf @@ -21,6 +21,13 @@ try_files $uri @index-redirect; expires 1h; } + + # only cache /resources/config.* for 5 minutes since it changes often + location /resources/config. { + try_files $uri =404; + expires 5m; + } + location @index-redirect { rewrite (.*) /$lang/index.html; } diff --git a/production/nginx/server-common.conf b/production/nginx/server-common.conf index dedd36411..1d1bcbcd1 100644 --- a/production/nginx/server-common.conf +++ b/production/nginx/server-common.conf @@ -81,6 +81,13 @@ location /resources { try_files $uri /en-US/index.html; expires 1w; } + +# only cache /resources/config.* for 5 minutes since it changes often +location /resources/config. { + try_files $uri =404; + expires 5m; +} + # cache /main.f40e91d908a068a2.js forever since they never change location ~* ^/.+\..+\.(js|css) { try_files /$lang/$uri /en-US/$uri =404;