feat: optimize About button layout and enhance static file caching strategy
This commit is contained in:
+10
-1
@@ -56,10 +56,19 @@ if (isProduction) {
|
||||
root: distPath,
|
||||
prefix: "/",
|
||||
cacheControl: true,
|
||||
maxAge: 3600000 * 24 * 7, // 7일간 캐시 유지
|
||||
maxAge: 3600000 * 24 * 7,
|
||||
immutable: true,
|
||||
lastModified: true,
|
||||
etag: true,
|
||||
setHeaders: (res, path) => {
|
||||
// index.html은 캐싱하지 않음 (업데이트 반영을 위해)
|
||||
if (path.endsWith("index.html")) {
|
||||
res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
|
||||
return;
|
||||
}
|
||||
// 나머지 정적 자산(이미지, js, css 등)은 강력 캐싱
|
||||
res.setHeader("Cache-Control", "public, max-age=604800, immutable");
|
||||
},
|
||||
});
|
||||
|
||||
app.setNotFoundHandler((request, reply) => {
|
||||
|
||||
Reference in New Issue
Block a user