Skip to content

Commit

Permalink
perf: enable cache for static files in nginx (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturLange committed Feb 21, 2024
1 parent ea2e164 commit 935037e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ http {
client_max_body_size 50M;
}

location ~* \.(woff|woff2|otf|jpg|jpeg|png|webp|css|js|ttf|svg|ico)$ {
add_header Cache-Control public;
add_header Pragma public;
add_header Vary Accept-Encoding;
expires max;
}

# Make vue.js app available under /app
location /app/ {
alias /var/static/app/;
Expand Down

0 comments on commit 935037e

Please sign in to comment.