mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
65 lines
1.4 KiB
Plaintext
65 lines
1.4 KiB
Plaintext
location /fonts/ {
|
|
# trailing slash
|
|
|
|
alias /data/ofm/http_host/assets/fonts/ofm/; # trailing slash
|
|
try_files $uri =404;
|
|
|
|
expires 1w;
|
|
|
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
|
add_header Cache-Control public;
|
|
}
|
|
|
|
location /styles/ {
|
|
# trailing slash
|
|
|
|
alias /data/ofm/http_host/assets/styles/ofm/; # trailing slash
|
|
try_files $uri.json =404;
|
|
|
|
expires 1d;
|
|
default_type application/json;
|
|
|
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
|
add_header Cache-Control public;
|
|
}
|
|
|
|
location /natural_earth/ {
|
|
# trailing slash
|
|
|
|
alias /data/ofm/http_host/assets/natural_earth/ofm/; # trailing slash
|
|
try_files $uri =404;
|
|
|
|
expires 10y;
|
|
|
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
|
add_header Cache-Control public;
|
|
}
|
|
|
|
location /sprites/ {
|
|
# trailing slash
|
|
|
|
alias /data/ofm/http_host/assets/sprites/; # trailing slash
|
|
try_files $uri =404;
|
|
|
|
expires 10y;
|
|
|
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
|
add_header Cache-Control public;
|
|
}
|
|
|
|
|
|
# we need to handle missing tiles as valid request returning empty string
|
|
location @empty_tile {
|
|
return 200 '';
|
|
|
|
expires 10y;
|
|
default_type application/vnd.mapbox-vector-tile;
|
|
|
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
|
add_header Cache-Control public;
|
|
}
|
|
|
|
location = / {
|
|
return 302 https://openfreemap.org;
|
|
}
|