mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-22 14:32:15 +00:00
work
This commit is contained in:
@@ -45,7 +45,7 @@ def cli():
|
|||||||
print(f"{metadata_path} doesn't exists, skipping")
|
print(f"{metadata_path} doesn't exists, skipping")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
url_prefix = f'https://tiles.openfreemap.com/{area}/{version}/tiles//'
|
url_prefix = f'https://tiles.openfreemap.com/{area}/{version}'
|
||||||
|
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
[
|
[
|
||||||
@@ -59,20 +59,24 @@ def cli():
|
|||||||
check=True,
|
check=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# TODO raise expires if everything is stable
|
||||||
version_str = rf"""
|
version_str = rf"""
|
||||||
location /{area}/{version} {{ # no trailing hash
|
location /{area}/{version} {{ # no trailing hash
|
||||||
alias {tilejson_path}; # no trailing hash\
|
alias {tilejson_path}; # no trailing hash
|
||||||
|
|
||||||
default_type application/json;
|
default_type application/json;
|
||||||
|
gzip on;
|
||||||
|
|
||||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
add_header Cache-Control public;
|
add_header Cache-Control public;
|
||||||
expires 10y;
|
expires 1d;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
location /{area}/{version}/ {{ # trailing hash
|
location /{area}/{version}/ {{ # trailing hash
|
||||||
alias {subdir}/tiles/; # trailing hash
|
alias {subdir}/tiles/; # trailing hash
|
||||||
try_files $uri @empty;
|
try_files $uri @empty;
|
||||||
|
|
||||||
|
add_header Content-Encoding gzip;
|
||||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
add_header Cache-Control public;
|
add_header Cache-Control public;
|
||||||
expires 10y;
|
expires 10y;
|
||||||
|
|||||||
Reference in New Issue
Block a user