diff --git a/package-lock.json b/package-lock.json index f3915ed..582609b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8102,7 +8102,7 @@ } }, "sapper": { - "version": "github:nolanlawson/sapper#ec86bbb81d6b7346d3332b3d31fd507a01010f2f", + "version": "github:nolanlawson/sapper#701bc3455a9387d76f8047e7152c8295c9516788", "requires": { "chalk": "2.3.2", "chokidar": "1.7.0", diff --git a/package.json b/package.json index 246714e..1ae90ff 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "pify": "^3.0.0", "quick-lru": "^1.1.0", "requestidlecallback": "^0.3.0", - "sapper": "nolanlawson/sapper#monkey-patches", + "sapper": "github:nolanlawson/sapper#monkey-patches", "serve-static": "^1.13.1", "standard": "^10.0.3", "stringz": "^0.4.0", diff --git a/server.js b/server.js index 1a87422..46259d7 100644 --- a/server.js +++ b/server.js @@ -14,7 +14,11 @@ global.fetch = (url, opts) => { app.use(compression({ threshold: 0 })) -app.use(serveStatic('assets')) +app.use(serveStatic('assets', { + setHeaders: (res) => { + res.setHeader('Cache-Control', 'public,max-age=14400') + } +})) app.use(sapper())