From 917b005a8b3c81e2252549a0980553bd43f02e49 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Wed, 26 Dec 2018 18:40:20 +0100 Subject: [PATCH] Serve pictures too --- server/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/index.js b/server/index.js index a4fa4e4..cc06254 100644 --- a/server/index.js +++ b/server/index.js @@ -21,6 +21,11 @@ app setHeaders: (res) => { res.setHeader('cache-control', 'immutable'); }, + }))) + .use(Mount('/pictures', Static(path.resolve(__dirname, '../pictures'), { + setHeaders: (res) => { + res.setHeader('cache-control', 'immutable'); + }, }))); module.exports = app;