mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
nginx cors
This commit is contained in:
@@ -63,6 +63,7 @@ def cli():
|
|||||||
location /{area}/{version} {{ # no trailing hash
|
location /{area}/{version} {{ # no trailing hash
|
||||||
alias {tilejson_path}; # no trailing hash
|
alias {tilejson_path}; # no trailing hash
|
||||||
|
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
add_header Cache-Control public;
|
add_header Cache-Control public;
|
||||||
expires 10y;
|
expires 10y;
|
||||||
}}
|
}}
|
||||||
@@ -71,6 +72,7 @@ def cli():
|
|||||||
alias {subdir}/tiles/; # trailing hash
|
alias {subdir}/tiles/; # trailing hash
|
||||||
try_files $uri @empty;
|
try_files $uri @empty;
|
||||||
|
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
add_header Cache-Control public;
|
add_header Cache-Control public;
|
||||||
expires 10y;
|
expires 10y;
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ server {
|
|||||||
default_type application/vnd.mapbox-vector-tile;
|
default_type application/vnd.mapbox-vector-tile;
|
||||||
return 200 '';
|
return 200 '';
|
||||||
|
|
||||||
|
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