mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 03:36:05 +00:00
fix: nginx cache (#1523)
This commit is contained in:
parent
1a84396691
commit
04971c3824
@ -6,10 +6,18 @@ server {
|
||||
client_max_body_size 20M;
|
||||
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/javascript application/xml;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
# 不缓存 HTML 文件
|
||||
location ~ \.html$ {
|
||||
expires -1;
|
||||
}
|
||||
|
||||
# 缓存 JavaScript 和 CSS 文件
|
||||
location ~* \.(js|css)$ {
|
||||
expires 1d;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
location /storage/uploads/ {
|
||||
alias /app/nocobase/storage/uploads/;
|
||||
|
Loading…
Reference in New Issue
Block a user