nginx target

This commit is contained in:
Zsolt Ero
2024-01-19 16:29:09 +01:00
parent 53942d69ab
commit f2cbfd5fb8
2 changed files with 5 additions and 5 deletions

View File

@@ -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;

View File

@@ -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;