diff --git a/scripts/http_host/nginx_sync/nginx_sync.py b/scripts/http_host/nginx_sync/nginx_sync.py index 380c852..e8bd440 100755 --- a/scripts/http_host/nginx_sync/nginx_sync.py +++ b/scripts/http_host/nginx_sync/nginx_sync.py @@ -63,6 +63,7 @@ def cli(): location /{area}/{version} {{ # no trailing hash alias {tilejson_path}; # no trailing hash + add_header 'Access-Control-Allow-Origin' '*' always; add_header Cache-Control public; expires 10y; }} @@ -71,6 +72,7 @@ def cli(): alias {subdir}/tiles/; # trailing hash try_files $uri @empty; + add_header 'Access-Control-Allow-Origin' '*' always; add_header Cache-Control public; expires 10y; }} diff --git a/scripts/http_host/nginx_sync/nginx_template.conf b/scripts/http_host/nginx_sync/nginx_template.conf index cd4a2c4..f001799 100644 --- a/scripts/http_host/nginx_sync/nginx_template.conf +++ b/scripts/http_host/nginx_sync/nginx_template.conf @@ -14,6 +14,7 @@ server { default_type application/vnd.mapbox-vector-tile; return 200 ''; + add_header 'Access-Control-Allow-Origin' '*' always; add_header Cache-Control public; expires 10y; }