Skip to content

Commit

Permalink
core: frontend: add cache headers for logviewer and assets folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani authored and patrickelectric committed Mar 27, 2024
1 parent 71ac6e8 commit d9e3cfe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/tools/nginx/nginx.conf
Expand Up @@ -133,6 +133,7 @@ http {

location ^~ /logviewer {
# ^~ makes this a higher priority than locations with regex
expires 10d;
root /home/pi/tools;
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit d9e3cfe

Please sign in to comment.