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