fix Cache-Control in sapper
This commit is contained in:
parent
0c9992c0e1
commit
99ff58968b
3 changed files with 7 additions and 3 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -8102,7 +8102,7 @@
|
|||
}
|
||||
},
|
||||
"sapper": {
|
||||
"version": "github:nolanlawson/sapper#ec86bbb81d6b7346d3332b3d31fd507a01010f2f",
|
||||
"version": "github:nolanlawson/sapper#701bc3455a9387d76f8047e7152c8295c9516788",
|
||||
"requires": {
|
||||
"chalk": "2.3.2",
|
||||
"chokidar": "1.7.0",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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())
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue