From 166e60b4793b6a65f60478ca56e54ece104f1e9e Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Thu, 21 Mar 2024 16:17:08 -0300 Subject: [PATCH] core: frontend: add cache headers for logviewer and assets folder --- core/tools/nginx/nginx.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/tools/nginx/nginx.conf b/core/tools/nginx/nginx.conf index b4a0c10da..46f30aff4 100644 --- a/core/tools/nginx/nginx.conf +++ b/core/tools/nginx/nginx.conf @@ -133,6 +133,7 @@ http { location ^~ /logviewer { # ^~ makes this a higher priority than locations with regex + expires 10d; root /home/pi/tools; } @@ -217,6 +218,13 @@ http { autoindex_format json; } + location /assets/ { + root /home/pi/frontend; + try_files $uri $uri/; + autoindex on; + add_header Cache-Control "public, max-age=604800"; + } + location ~ ^/upload(/.*)$ { client_max_body_size 100M; alias /usr/blueos$1;