From 2564bb9c56a53fc6e2b103f4ca6b1d95617652b5 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Tue, 30 Jan 2024 11:46:20 -0800 Subject: [PATCH 1/2] [www] cache font assets --- services/frontend/nginx.conf.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/frontend/nginx.conf.template b/services/frontend/nginx.conf.template index 6367bdf19..c08d87c04 100644 --- a/services/frontend/nginx.conf.template +++ b/services/frontend/nginx.conf.template @@ -57,7 +57,7 @@ http { add_header Cache-Control "no-cache, no-store, must-revalidate"; } - location ~* \.(?:css|js|jpg|svg)$ { + location ~* \.(?:css|js|jpg|svg|woff|woff2)$ { expires 30d; # We aggressively cache assets, since our asset URLs contain a # cache-buster From cfdf98eccc3cb4dfb7f39526c3e37939fd7de8ed Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Tue, 30 Jan 2024 12:04:54 -0800 Subject: [PATCH 2/2] [www] cache tileserver assets This will entail being more careful about rolling out breaking changes. --- services/frontend/nginx.conf.template | 1 + 1 file changed, 1 insertion(+) diff --git a/services/frontend/nginx.conf.template b/services/frontend/nginx.conf.template index c08d87c04..d7df3c724 100644 --- a/services/frontend/nginx.conf.template +++ b/services/frontend/nginx.conf.template @@ -38,6 +38,7 @@ http { } location /tileserver/ { + expires 1h; proxy_pass ${HEADWAY_TILESERVER_URL}/; }