From 2900e5786d5f9b86d820840a62a96cef27606a3c Mon Sep 17 00:00:00 2001 From: ndrsg Date: Wed, 5 May 2021 11:46:35 +0200 Subject: [PATCH] Update setup-universal.utils.ts Should be app.use() instead of app.get(). Otherwise there are problems with resolving files in serve-static, because the path gets not stripped with app.get(). https://github.com/expressjs/serve-static --- lib/utils/setup-universal.utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/setup-universal.utils.ts b/lib/utils/setup-universal.utils.ts index 373936c3..8eac597a 100755 --- a/lib/utils/setup-universal.utils.ts +++ b/lib/utils/setup-universal.utils.ts @@ -50,7 +50,7 @@ export function setupUniversal(app: any, ngOptions: AngularUniversalOptions) { app.set('views', ngOptions.viewsPath); // Serve static files - app.get( + app.use( ngOptions.rootStaticPath, express.static(ngOptions.viewsPath, { maxAge: 600