shenanigans

This commit is contained in:
Matthias Wirth
2020-01-31 02:47:01 +01:00
parent 42de111c2d
commit a86ad8f799
5 changed files with 24 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@@ -73,7 +73,7 @@ function request_from_db(icao, level, defer) {
function getIcaoAircraftTypeData(aircraftData, defer) {
if (_aircraft_type_cache === null) {
$.getJSON("db2/aircraft_types/icao_aircraft_types.json")
$.getJSON("db2/icao_aircraft_types.json")
.done(function(typeLookupData) {
_aircraft_type_cache = typeLookupData;
})

View File

@@ -516,7 +516,7 @@ function initialize() {
// Wait for history item downloads and append them to the buffer
push_history();
// this will be needed later
$.getJSON("db2/aircraft_types/icao_aircraft_types.json")
$.getJSON("db2/icao_aircraft_types.json")
.done(function(typeLookupData) {
_aircraft_type_cache = typeLookupData;
})

View File

@@ -216,6 +216,25 @@ do
mv colors.css colors_$epoch.css
mv style.css style_$epoch.css
if [[ $nginx == yes ]]; then
gzip -k -9 dbloader_$epoch.js
gzip -k -9 defaults_$epoch.js
gzip -k -9 early_$epoch.js
gzip -k -9 flags_$epoch.js
gzip -k -9 formatter_$epoch.js
gzip -k -9 layers_$epoch.js
gzip -k -9 markers_$epoch.js
gzip -k -9 planeObject_$epoch.js
gzip -k -9 registrations_$epoch.js
gzip -k -9 script_$epoch.js
gzip -k -9 colors_$epoch.css
gzip -k -9 style_$epoch.css
gzip -k -9 jquery/*.js
gzip -k -9 ol/*.js
#gzip -k -9 db2/*.json .... already exists compressed
fi
cd "$dir"
cp nginx.conf $ipath/nginx-$service.conf

View File

@@ -18,6 +18,7 @@ location /INSTANCE/data/ {
}
location ~ globe_.*\.json$ {
add_header Cache-Control "public, max-age=2";
add_header Content-Encoding "gzip";
}
}
@@ -49,6 +50,8 @@ location /INSTANCE {
alias HTMLPATH/;
try_files $uri $uri/ =404;
gzip_static on;
location ~ db2/.*\.json$ {
add_header Cache-Control "public, max-age=100000";
}