use cache control on static
Build image / build (push) Has been cancelled Details

This commit is contained in:
Alie 2024-08-30 08:56:53 +02:00
parent fd9f7862d0
commit ec1c1a3134
1 changed files with 8 additions and 1 deletions

View File

@ -4,12 +4,19 @@ import app from "./app.js";
const site = express();
const maxAge = 1000 * 60 * 60 * 24 * 7;
nunjucks.configure("templates", {
autoescape: true,
express: site,
});
site.use(express.static("."));
site.use(
express.static(".", {
maxAge: maxAge,
immutable: true,
})
);
site.get("/", app.index);