use cache control on static
Build image / build (push) Has been cancelled
Details
Build image / build (push) Has been cancelled
Details
This commit is contained in:
parent
fd9f7862d0
commit
ec1c1a3134
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue