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 // Init LiveDirectory middlewares for static assets
const serveLiveDirectoryPublicInstance = new ServeLiveDirectory( // Static assets in /public directory
{ path: paths.public }, const serveLiveDirectoryPublicInstance = new ServeLiveDirectory({ path: paths.public }, {
{ setHeaders: setHeadersForStaticAssets } setHeaders: setHeadersForStaticAssets
) })
safe.use(serveLiveDirectoryPublicInstance.middleware) safe.use(serveLiveDirectoryPublicInstance.middleware)
const serveLiveDirectoryDistInstance = new ServeLiveDirectory( // Static assets in /dist directory
{ path: paths.dist }, const serveLiveDirectoryDistInstance = new ServeLiveDirectory({ path: paths.dist }, {
{ setHeaders: setHeadersForStaticAssets } setHeaders: setHeadersForStaticAssets
) })
safe.use(serveLiveDirectoryDistInstance.middleware) safe.use(serveLiveDirectoryDistInstance.middleware)
// Routes // Routes