Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: frontend: add cache headers for logviewer and assets folder #2479

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions core/tools/nginx/nginx.conf
Original file line number Diff line number Diff line change
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
Loading