fix: allowed client router to take over routing past the mount point (#2086)

This commit is contained in:
Wyatt Johnson
2018-11-21 17:56:50 +01:00
committed by Kiwi
parent 21e1a5cbef
commit f160eae500
+3 -1
View File
@@ -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;
}