mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-22 14:32:15 +00:00
nginx
This commit is contained in:
@@ -25,6 +25,18 @@ server {
|
|||||||
|
|
||||||
___LOCATION_BLOCKS___
|
___LOCATION_BLOCKS___
|
||||||
|
|
||||||
|
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/ {
|
location /styles/ {
|
||||||
# trailing slash
|
# trailing slash
|
||||||
|
|
||||||
@@ -38,13 +50,13 @@ server {
|
|||||||
add_header Cache-Control public;
|
add_header Cache-Control public;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /fonts/ {
|
location /natural_earth/ {
|
||||||
# trailing slash
|
# trailing slash
|
||||||
|
|
||||||
alias /data/ofm/http_host/assets/fonts/; # trailing slash
|
alias /data/ofm/http_host/assets/natural_earth/ofm/; # trailing slash
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
|
|
||||||
expires 1w;
|
expires 10y;
|
||||||
|
|
||||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
add_header Cache-Control public;
|
add_header Cache-Control public;
|
||||||
@@ -62,17 +74,7 @@ server {
|
|||||||
add_header Cache-Control public;
|
add_header Cache-Control public;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /ne2_shaded/ {
|
|
||||||
# trailing slash
|
|
||||||
|
|
||||||
alias /data/ofm/http_host/assets/natural_earth/tiles/natural_earth_2_shaded_relief.raster/; # 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
|
# we need to handle missing tiles as valid request returning empty string
|
||||||
location @empty_tile {
|
location @empty_tile {
|
||||||
|
|||||||
Reference in New Issue
Block a user