fix: cache with index.html (#1541)
* fix: cache with index.html * fix: docker build
This commit is contained in:
parent
cd7338d1d8
commit
51e6aaec6a
@ -11,6 +11,7 @@ fi
|
||||
if [ ! -f "/app/nocobase/package.json" ]; then
|
||||
echo 'copying...'
|
||||
tar -zxf /app/nocobase.tar.gz --absolute-names -C /app/nocobase
|
||||
touch /app/nocobase/packages/app/client/dist/index.html
|
||||
fi
|
||||
|
||||
cd /app/nocobase && yarn start --quickstart
|
||||
|
@ -10,12 +10,14 @@ server {
|
||||
|
||||
# 不缓存 HTML 文件
|
||||
location ~ \.html$ {
|
||||
expires -1;
|
||||
if_modified_since off;
|
||||
expires off;
|
||||
etag off;
|
||||
}
|
||||
|
||||
# 缓存 JavaScript 和 CSS 文件
|
||||
location ~* \.(js|css)$ {
|
||||
expires 1d;
|
||||
expires 365d;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user