use router for static assets

This commit is contained in:
William Welling
2022-06-02 10:16:49 -05:00
parent 5996efec1a
commit cfb4a627be

View File

@@ -163,7 +163,7 @@ export function app() {
* Serve static resources (images, i18n messages, …) * Serve static resources (images, i18n messages, …)
* Handle pre-compressed files with [express-static-gzip](https://github.com/tkoenig89/express-static-gzip) * Handle pre-compressed files with [express-static-gzip](https://github.com/tkoenig89/express-static-gzip)
*/ */
server.get('*.*', cacheControl, expressStaticGzip(DIST_FOLDER, { router.get('*.*', cacheControl, expressStaticGzip(DIST_FOLDER, {
index: false, index: false,
enableBrotli: true, enableBrotli: true,
orderPreference: ['br', 'gzip'], orderPreference: ['br', 'gzip'],