parent
a1b89805e7
commit
9a79a6ff7f
11
server.js
11
server.js
|
@ -48,6 +48,17 @@ app.use(nonDebugOnly(helmet({
|
|||
}
|
||||
})))
|
||||
|
||||
// TODO: remove this hack when Safari works with cross-origin window.open()
|
||||
// in a PWA: https://github.com/nolanlawson/pinafore/issues/45
|
||||
app.get('/manifest.json', (req, res, next) => {
|
||||
if (/iP(?:hone|ad|od)/.test(req.headers['user-agent'])) {
|
||||
return res.status(404).send({
|
||||
error: 'manifest.json is disabled for iOS. see https://github.com/nolanlawson/pinafore/issues/45'
|
||||
})
|
||||
}
|
||||
return next()
|
||||
})
|
||||
|
||||
app.use(serveStatic('assets', {
|
||||
setHeaders: (res) => {
|
||||
res.setHeader('Cache-Control', 'public,max-age=600')
|
||||
|
|
Loading…
Reference in a new issue