nginx, added timeout to requests

This commit is contained in:
Zsolt Ero
2024-01-08 19:16:32 +01:00
parent 44359c8ca9
commit a011f9c803
5 changed files with 29 additions and 9 deletions

View File

@@ -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;
}
}