From f160eae5003142733b87128c18a10a4fec0b9fcc Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Wed, 21 Nov 2018 16:56:50 +0000 Subject: [PATCH] fix: allowed client router to take over routing past the mount point (#2086) --- src/core/server/app/router/client.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/server/app/router/client.ts b/src/core/server/app/router/client.ts index 067b0d4c2..4e8c9d5c9 100644 --- a/src/core/server/app/router/client.ts +++ b/src/core/server/app/router/client.ts @@ -28,9 +28,11 @@ export function createClientTargetRouter({ // Create a router. const router = express.Router(); + // Always send the cache headers. router.use(cacheHeadersMiddleware(cacheDuration)); - router.get("/", (req, res) => res.render(view, { staticURI })); + // Wildcard display all the client routes under the provided prefix. + router.get("/*", (req, res) => res.render(view, { staticURI })); return router; }