diff --git a/packages/angular/src/generators/setup-ssr/__snapshots__/setup-ssr.spec.ts.snap b/packages/angular/src/generators/setup-ssr/__snapshots__/setup-ssr.spec.ts.snap index 8170d0628afda..92fdc452d3d35 100644 --- a/packages/angular/src/generators/setup-ssr/__snapshots__/setup-ssr.spec.ts.snap +++ b/packages/angular/src/generators/setup-ssr/__snapshots__/setup-ssr.spec.ts.snap @@ -356,13 +356,15 @@ export function app(): express.Express { // Example Express Rest API endpoints // server.get('/api/**', (req, res) => { }); // Serve static files from /browser - server.get('**', express.static(distFolder, { - maxAge: '1y', - index: 'index.html' - })); + server.get( + '*.*', + express.static(distFolder, { + maxAge: '1y', + }) + ); // All regular routes use the Angular engine - server.get('**', (req, res, next) => { + server.get('*', (req, res, next) => { const { protocol, originalUrl, baseUrl, headers } = req; commonEngine @@ -457,13 +459,15 @@ export function app(): express.Express { // Example Express Rest API endpoints // server.get('/api/**', (req, res) => { }); // Serve static files from /browser - server.get('**', express.static(distFolder, { - maxAge: '1y', - index: 'index.html' - })); + server.get( + '*.*', + express.static(distFolder, { + maxAge: '1y', + }) + ); // All regular routes use the Angular engine - server.get('**', (req, res, next) => { + server.get('*', (req, res, next) => { const { protocol, originalUrl, baseUrl, headers } = req; commonEngine diff --git a/packages/angular/src/generators/setup-ssr/files/server/server-builder/v17+/__serverFileName__ b/packages/angular/src/generators/setup-ssr/files/server/server-builder/v17+/__serverFileName__ index 082dc313e699e..fc75b432497ae 100644 --- a/packages/angular/src/generators/setup-ssr/files/server/server-builder/v17+/__serverFileName__ +++ b/packages/angular/src/generators/setup-ssr/files/server/server-builder/v17+/__serverFileName__ @@ -23,13 +23,15 @@ export function app(): express.Express { // Example Express Rest API endpoints // server.get('/api/**', (req, res) => { }); // Serve static files from /browser - server.get('**', express.static(distFolder, { - maxAge: '1y', - index: 'index.html' - })); + server.get( + '*.*', + express.static(distFolder, { + maxAge: '1y', + }) + ); // All regular routes use the Angular engine - server.get('**', (req, res, next) => { + server.get('*', (req, res, next) => { const { protocol, originalUrl, baseUrl, headers } = req; commonEngine