From f84b4f6e3d0fff2d4b0fd19fe8c7742c73ebb297 Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Fri, 29 Dec 2023 04:18:46 +0100 Subject: [PATCH] nginx --- scripts/http_host/nginx_sync/nginx_sync.py | 3 +++ scripts/http_host/nginx_sync/nginx_template.conf | 3 +++ 2 files changed, 6 insertions(+) diff --git a/scripts/http_host/nginx_sync/nginx_sync.py b/scripts/http_host/nginx_sync/nginx_sync.py index 8663da0..dd0d066 100755 --- a/scripts/http_host/nginx_sync/nginx_sync.py +++ b/scripts/http_host/nginx_sync/nginx_sync.py @@ -34,6 +34,9 @@ def cli(): location /{area}/{version}/ {{ # trailing hash important alias {subdir}/; # trailing hash important try_files $uri @empty; + + add_header Cache-Control public; + expires 10y; }} """ diff --git a/scripts/http_host/nginx_sync/nginx_template.conf b/scripts/http_host/nginx_sync/nginx_template.conf index d943c43..6b065ec 100644 --- a/scripts/http_host/nginx_sync/nginx_template.conf +++ b/scripts/http_host/nginx_sync/nginx_template.conf @@ -13,5 +13,8 @@ server { location @empty { default_type application/vnd.mapbox-vector-tile; return 200 ''; + + add_header Cache-Control public; + expires 10y; } }