This commit is contained in:
2025-06-29 16:38:04 +00:00
parent fbaf93e426
commit 1bf921a56e
3 changed files with 13 additions and 13 deletions

View File

@@ -97,6 +97,17 @@ app.get(
}),
);
// Serve static files with automatic ETag handling
app.use(
"/content",
express.static(STATIC_DIR, {
etag: true, // Enable automatic ETag generation
lastModified: true, // Include Last-Modified header
maxAge: 3600000, // Cache for 1 hour, but always revalidate
immutable: false, // Files can change
}),
);
app.get(
"/structure",
asyncHandler(async (req, res) => {