From 207ed14dd00330136e023c3e45037f0cbf051bd1 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 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/tools/nginx/nginx.conf b/core/tools/nginx/nginx.conf index b4a0c10da8..191c1b74c9 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,14 @@ http { autoindex_format json; } + location /assets/ { + root /home/pi/frontend/assets; + autoindex on; + # allow frontend to see files using json + autoindex_format json; + expires 5d; # built files have a hash, so we shouldn't have issues with old cache + } + location ~ ^/upload(/.*)$ { client_max_body_size 100M; alias /usr/blueos$1;