button down gzip shenanigans for nginx
(hopefully fixes Safari issue with mikenyes docker container)
This commit is contained in:
20
nginx.conf
20
nginx.conf
@@ -1,8 +1,10 @@
|
||||
# nginx configuration for tar1090
|
||||
location /INSTANCE/data/ {
|
||||
alias SOURCE_DIR/;
|
||||
gzip_static off;
|
||||
location ~ aircraft\.json$ {
|
||||
add_header Cache-Control "public, max-age=0";
|
||||
gzip_static on;
|
||||
}
|
||||
location /INSTANCE/data/traces/ {
|
||||
location ~ trace_recent {
|
||||
@@ -31,6 +33,7 @@ location /INSTANCE/data/ {
|
||||
location /INSTANCE/globe_history/ {
|
||||
alias /var/globe_history/;
|
||||
gzip on;
|
||||
gzip_static off;
|
||||
|
||||
location ~ /acas/ {
|
||||
default_type text/plain;
|
||||
@@ -58,17 +61,21 @@ location /INSTANCE/globe_history/ {
|
||||
|
||||
location /INSTANCE/chunks/ {
|
||||
alias /run/SERVICE/;
|
||||
gzip_static off;
|
||||
location ~ chunk_.*\.gz$ {
|
||||
gzip off;
|
||||
add_header Cache-Control "public, max-age=86400";
|
||||
add_header Content-Type "application/json";
|
||||
add_header Content-Encoding "gzip";
|
||||
}
|
||||
location ~ current_.*\.gz$ {
|
||||
gzip off;
|
||||
add_header Cache-Control "must-revalidate";
|
||||
add_header Content-Type "application/json";
|
||||
add_header Content-Encoding "gzip";
|
||||
}
|
||||
location ~ .*\.json$ {
|
||||
gzip on;
|
||||
add_header Cache-Control "public, max-age=0";
|
||||
}
|
||||
}
|
||||
@@ -82,11 +89,12 @@ location /INSTANCE/aircraft_sil/ {
|
||||
location /INSTANCE {
|
||||
alias HTMLPATH/;
|
||||
try_files $uri $uri/ =404;
|
||||
|
||||
gzip_static on;
|
||||
gzip off;
|
||||
gzip_static off;
|
||||
|
||||
location ~ db-.*\.js$ {
|
||||
gzip off;
|
||||
gzip_static off;
|
||||
add_header Cache-Control "public, max-age=7776000";
|
||||
add_header Content-Encoding "gzip";
|
||||
}
|
||||
@@ -101,14 +109,22 @@ location /INSTANCE {
|
||||
}
|
||||
location ~ index.html$ {
|
||||
add_header Cache-Control "public, max-age=300";
|
||||
gzip on;
|
||||
gzip_static on;
|
||||
}
|
||||
location ~ config.js$ {
|
||||
add_header Cache-Control "public, max-age=10";
|
||||
gzip on;
|
||||
gzip_static on;
|
||||
}
|
||||
location ~ .*\.js$ {
|
||||
add_header Cache-Control "public, max-age=7776000";
|
||||
gzip on;
|
||||
gzip_static on;
|
||||
}
|
||||
location ~ .*\.css$ {
|
||||
add_header Cache-Control "public, max-age=7776000";
|
||||
gzip on;
|
||||
gzip_static on;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user