54 lines
1.4 KiB
Plaintext
54 lines
1.4 KiB
Plaintext
# nginx configuration for tar1090 for access via /
|
|
location /data/ {
|
|
alias /run/dump1090-fa/;
|
|
location ~ aircraft\.json$ {
|
|
add_header Cache-Control "public, max-age=0";
|
|
}
|
|
location ~ icao_.*\.json$ {
|
|
add_header Cache-Control "public, max-age=10";
|
|
}
|
|
location ~ globe_.*\.json$ {
|
|
add_header Cache-Control "public, max-age=0";
|
|
}
|
|
}
|
|
|
|
location /chunks/ {
|
|
alias /run/tar1090/;
|
|
location ~ chunk_.*\.gz$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
add_header Content-Type "application/json";
|
|
add_header Content-Encoding "gzip";
|
|
}
|
|
location ~ current_.*\.gz$ {
|
|
add_header Cache-Control "must-revalidate";
|
|
add_header Content-Type "application/json";
|
|
add_header Content-Encoding "gzip";
|
|
}
|
|
location ~ .*\.json$ {
|
|
add_header Cache-Control "public, max-age=0";
|
|
}
|
|
}
|
|
|
|
location / {
|
|
alias /usr/local/share/tar1090/html/;
|
|
try_files $uri $uri/ =404;
|
|
location ~ db/.*\.json$ {
|
|
add_header Cache-Control "public, max-age=86400";
|
|
}
|
|
location ~ .*\.png$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
}
|
|
location ~ .*\.gif$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
}
|
|
location ~ config.js$ {
|
|
add_header Cache-Control "must-revalidate";
|
|
}
|
|
location ~ .*\.js$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
}
|
|
location ~ .*\.css$ {
|
|
add_header Cache-Control "public, max-age=1209600";
|
|
}
|
|
}
|