mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 22:12:15 +00:00
nginx
This commit is contained in:
@@ -25,12 +25,24 @@ server {
|
||||
|
||||
___LOCATION_BLOCKS___
|
||||
|
||||
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 /fonts/ {
|
||||
# trailing slash
|
||||
|
||||
alias /data/ofm/http_host/assets/fonts/; # trailing slash
|
||||
try_files $uri =404;
|
||||
default_type application/x-protobuf;
|
||||
|
||||
expires 1d; # target 1w
|
||||
|
||||
@@ -63,11 +75,11 @@ server {
|
||||
}
|
||||
|
||||
# we need to handle missing tiles as valid request returning empty string
|
||||
location @empty {
|
||||
default_type application/vnd.mapbox-vector-tile;
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user