From 088b805da74bcea2622220bde80b417526eab4e8 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Wed, 24 Mar 2021 11:39:54 +0100 Subject: [PATCH] adjust nginx config --- nginx.conf | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/nginx.conf b/nginx.conf index cd9bf13..1ebd557 100644 --- a/nginx.conf +++ b/nginx.conf @@ -30,9 +30,30 @@ location /INSTANCE/data/ { location /INSTANCE/globe_history/ { alias /var/globe_history/; - gzip off; - add_header Cache-Control "public, max-age=3600"; - add_header Content-Encoding "gzip"; + gzip on; + + location ~ /acas/ { + default_type text/plain; + add_header Cache-Control "private, max-age=5"; + + gzip_static on; + gunzip on; + } + + location ~ ....-..-.. { + rewrite "^(.*)/globe_history/(....)-(..)-(..)/(.*)$" "$1/globe_history/$2/$3/$4/$5" last; + } + + location ~ traces/ { + gzip off; + add_header Cache-Control "public, max-age=1209600"; + add_header Content-Encoding "gzip"; + } + location ~ heatmap/ { + gzip off; + add_header Cache-Control "public, max-age=1209600"; + add_header Content-Encoding "gzip"; + } } location /INSTANCE/chunks/ {