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 committed Mar 21, 2024
1 parent 6285a9f commit 207ed14
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 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,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;
Expand Down

0 comments on commit 207ed14

Please sign in to comment.