mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
nginx target
This commit is contained in:
@@ -70,7 +70,7 @@ def create_version_location(area: str, version: str, subdir: Path) -> str:
|
|||||||
location = /{area}/{version} {{ # no trailing slash
|
location = /{area}/{version} {{ # no trailing slash
|
||||||
alias {tilejson_path}; # no trailing slash
|
alias {tilejson_path}; # no trailing slash
|
||||||
|
|
||||||
expires 1d; # TODO target 1w
|
expires 1w;
|
||||||
default_type application/json;
|
default_type application/json;
|
||||||
|
|
||||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
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;
|
try_files $uri @empty_tile;
|
||||||
add_header Content-Encoding gzip;
|
add_header Content-Encoding gzip;
|
||||||
|
|
||||||
expires 1d; # TODO target 10y
|
expires 10y;
|
||||||
|
|
||||||
types {{
|
types {{
|
||||||
application/vnd.mapbox-vector-tile pbf;
|
application/vnd.mapbox-vector-tile pbf;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ server {
|
|||||||
alias /data/ofm/http_host/assets/fonts/; # trailing slash
|
alias /data/ofm/http_host/assets/fonts/; # trailing slash
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
|
|
||||||
expires 1d; # target 1w
|
expires 1w;
|
||||||
|
|
||||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
add_header Cache-Control public;
|
add_header Cache-Control public;
|
||||||
@@ -56,7 +56,7 @@ server {
|
|||||||
alias /data/ofm/http_host/assets/sprites/; # trailing slash
|
alias /data/ofm/http_host/assets/sprites/; # trailing slash
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
|
|
||||||
expires 1d; # target 10y
|
expires 10y;
|
||||||
|
|
||||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
add_header Cache-Control public;
|
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
|
alias /data/ofm/http_host/assets/natural_earth/tiles/natural_earth_2_shaded_relief.raster/; # trailing slash
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
|
|
||||||
expires 1d; # target 10y
|
expires 10y;
|
||||||
|
|
||||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
add_header Cache-Control public;
|
add_header Cache-Control public;
|
||||||
|
|||||||
Reference in New Issue
Block a user