From 7510e75688d206b0adace765320d9995d5defc64 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Wed, 22 Jun 2016 14:37:24 +0200 Subject: [PATCH] Set Cache-Control for static resources --- src/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.js b/src/app.js index 276bf94..a9514bc 100644 --- a/src/app.js +++ b/src/app.js @@ -91,7 +91,7 @@ app.use(router.routes()); app.use(router.allowedMethods()); // serve static files -app.use(serve(__dirname + '/static')); +app.use(serve(__dirname + '/static', { maxage:31536000000 })); app.on('error', (error, ctx) => { if (error.status) {