chore: lolisafe.js

This commit is contained in:
Bobby Wibowo 2022-07-22 01:09:34 +07:00
parent 30e9227a78
commit 06178cc2c4
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF

View File

@ -189,16 +189,16 @@ if (config.cacheControl) {
})
}
// Static assets
const serveLiveDirectoryPublicInstance = new ServeLiveDirectory(
{ path: paths.public },
{ setHeaders: setHeadersForStaticAssets }
)
// Init LiveDirectory middlewares for static assets
// Static assets in /public directory
const serveLiveDirectoryPublicInstance = new ServeLiveDirectory({ path: paths.public }, {
setHeaders: setHeadersForStaticAssets
})
safe.use(serveLiveDirectoryPublicInstance.middleware)
const serveLiveDirectoryDistInstance = new ServeLiveDirectory(
{ path: paths.dist },
{ setHeaders: setHeadersForStaticAssets }
)
// Static assets in /dist directory
const serveLiveDirectoryDistInstance = new ServeLiveDirectory({ path: paths.dist }, {
setHeaders: setHeadersForStaticAssets
})
safe.use(serveLiveDirectoryDistInstance.middleware)
// Routes