chore: init dist static assets before public

This commit is contained in:
Bobby Wibowo 2022-07-31 14:49:58 +07:00
parent 2389974c7d
commit a6e1943655
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF

View File

@ -192,16 +192,16 @@ if (config.cacheControl) {
}
// Init ServeStaticQuick middlewares for static assets
// Static assets in /public directory
const serveStaticQuickPublicInstance = new ServeStaticQuick(paths.public, {
setHeaders: setHeadersForStaticAssets
})
safe.use(serveStaticQuickPublicInstance.middleware)
// Static assets in /dist directory
const serveStaticQuickDistInstance = new ServeStaticQuick(paths.dist, {
setHeaders: setHeadersForStaticAssets
})
safe.use(serveStaticQuickDistInstance.middleware)
// Static assets in /public directory
const serveStaticQuickPublicInstance = new ServeStaticQuick(paths.public, {
setHeaders: setHeadersForStaticAssets
})
safe.use(serveStaticQuickPublicInstance.middleware)
// Routes
safe.use(album)