From f2cbfd5fb8109d6ce9634ec263cab256ddb197ac Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Fri, 19 Jan 2024 16:29:09 +0100 Subject: [PATCH] nginx target --- scripts/http_host/http_host_lib/nginx.py | 4 ++-- scripts/http_host/http_host_lib/templates/nginx_cf.conf | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/http_host/http_host_lib/nginx.py b/scripts/http_host/http_host_lib/nginx.py index e665eca..ed10636 100644 --- a/scripts/http_host/http_host_lib/nginx.py +++ b/scripts/http_host/http_host_lib/nginx.py @@ -70,7 +70,7 @@ def create_version_location(area: str, version: str, subdir: Path) -> str: location = /{area}/{version} {{ # no trailing slash alias {tilejson_path}; # no trailing slash - expires 1d; # TODO target 1w + expires 1w; default_type application/json; add_header 'Access-Control-Allow-Origin' '*' always; @@ -82,7 +82,7 @@ def create_version_location(area: str, version: str, subdir: Path) -> str: try_files $uri @empty_tile; add_header Content-Encoding gzip; - expires 1d; # TODO target 10y + expires 10y; types {{ application/vnd.mapbox-vector-tile pbf; diff --git a/scripts/http_host/http_host_lib/templates/nginx_cf.conf b/scripts/http_host/http_host_lib/templates/nginx_cf.conf index afc66f2..6acfa52 100644 --- a/scripts/http_host/http_host_lib/templates/nginx_cf.conf +++ b/scripts/http_host/http_host_lib/templates/nginx_cf.conf @@ -44,7 +44,7 @@ server { alias /data/ofm/http_host/assets/fonts/; # trailing slash try_files $uri =404; - expires 1d; # target 1w + expires 1w; add_header 'Access-Control-Allow-Origin' '*' always; add_header Cache-Control public; @@ -56,7 +56,7 @@ server { alias /data/ofm/http_host/assets/sprites/; # trailing slash try_files $uri =404; - expires 1d; # target 10y + expires 10y; add_header 'Access-Control-Allow-Origin' '*' always; add_header Cache-Control public; @@ -68,7 +68,7 @@ server { alias /data/ofm/http_host/assets/natural_earth/tiles/natural_earth_2_shaded_relief.raster/; # trailing slash try_files $uri =404; - expires 1d; # target 10y + expires 10y; add_header 'Access-Control-Allow-Origin' '*' always; add_header Cache-Control public;