nginx cors

This commit is contained in:
Zsolt Ero
2023-12-30 19:42:19 +01:00
parent d95cd87bd9
commit fdc21f5b90
2 changed files with 3 additions and 0 deletions

View File

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

View File

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