diff --git a/scripts/http_host/http_host_lib/nginx.py b/scripts/http_host/http_host_lib/nginx.py index c7b5c3a..def8260 100644 --- a/scripts/http_host/http_host_lib/nginx.py +++ b/scripts/http_host/http_host_lib/nginx.py @@ -67,8 +67,8 @@ def create_version_location(area: str, version: str, subdir: Path) -> str: ) return f""" - location = /{area}/{version} {{ # no trailing hash - alias {tilejson_path}; # no trailing hash + location = /{area}/{version} {{ # no trailing slash + alias {tilejson_path}; # no trailing slash default_type application/json; add_header 'Access-Control-Allow-Origin' '*' always; @@ -76,8 +76,8 @@ def create_version_location(area: str, version: str, subdir: Path) -> str: expires 1d; # TODO target 1w }} - location /{area}/{version}/ {{ # trailing hash - alias {subdir}/tiles/; # trailing hash + location /{area}/{version}/ {{ # trailing slash + alias {subdir}/tiles/; # trailing slash try_files $uri @empty; add_header Content-Encoding gzip; @@ -103,8 +103,8 @@ def create_latest_locations() -> str: assert tilejson_path.exists() location_str += f""" - location = /{area} {{ # no trailing hash - alias {tilejson_path}; # no trailing hash + location = /{area} {{ # no trailing slash + alias {tilejson_path}; # no trailing slash default_type application/json; add_header 'Access-Control-Allow-Origin' '*' always; 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 1791f52..7f7a4bc 100644 --- a/scripts/http_host/http_host_lib/templates/nginx_cf.conf +++ b/scripts/http_host/http_host_lib/templates/nginx_cf.conf @@ -26,8 +26,8 @@ server { ___LOCATION_BLOCKS___ location /fonts/ { - # trailing hash - alias /data/ofm/http_host/assets/fonts/; # trailing hash + # trailing slash + alias /data/ofm/http_host/assets/fonts/; # trailing slash try_files $uri =404; default_type application/x-protobuf;