mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-22 06:22:16 +00:00
nginx, added timeout to requests
This commit is contained in:
@@ -27,13 +27,27 @@ server {
|
||||
|
||||
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
|
||||
|
||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||
add_header Cache-Control public;
|
||||
}
|
||||
|
||||
location /ne/ {
|
||||
# trailing slash
|
||||
|
||||
alias /data/ofm/http_host/assets/natural_earth/tiles; # trailing slash
|
||||
try_files $uri =404;
|
||||
|
||||
expires 1d; # target 10y
|
||||
|
||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||
add_header Cache-Control public;
|
||||
expires 1d; # target 1w
|
||||
}
|
||||
|
||||
# we need to handle missing tiles as valid request returning empty string
|
||||
@@ -41,9 +55,10 @@ server {
|
||||
default_type application/vnd.mapbox-vector-tile;
|
||||
return 200 '';
|
||||
|
||||
expires 10y;
|
||||
|
||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||
add_header Cache-Control public;
|
||||
expires 10y;
|
||||
}
|
||||
|
||||
location = / {
|
||||
@@ -53,5 +68,7 @@ server {
|
||||
# catch-all block to deny all other requests
|
||||
location / {
|
||||
deny all;
|
||||
|
||||
error_log /data/ofm/http_host/logs_nginx/tiles-org-error.log error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user