fix: add Cache-Control header to landing page

This commit is contained in:
OpenClaw Bot 2026-02-24 10:02:10 +00:00
parent 272c03c38d
commit d7b02a464a

View file

@ -257,6 +257,12 @@ app.use((req, res, next) => {
next();
});
// Landing page (explicit route to set Cache-Control header)
app.get("/", (_req, res) => {
res.setHeader('Cache-Control', 'public, max-age=3600');
res.sendFile(path.join(__dirname, "../public/index.html"));
});
app.use(express.static(path.join(__dirname, "../public"), {
etag: true,
cacheControl: false,