From 535a2110fa8780048bff7eafb2292baf4347bd5b Mon Sep 17 00:00:00 2001 From: Bryan Brooks Date: Wed, 4 Feb 2026 18:28:19 -0600 Subject: [PATCH] fix: use named wildcard for admin SPA fallback route Express 5 with path-to-regexp v8 requires named parameters for wildcards. Changed /admin/* to /admin/{*splat}. --- gateway/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gateway/src/index.ts b/gateway/src/index.ts index b171b39..fbdcac5 100644 --- a/gateway/src/index.ts +++ b/gateway/src/index.ts @@ -226,8 +226,8 @@ async function main(): Promise { const adminUiPath = path.join(process.cwd(), 'public', 'admin'); if (fs.existsSync(adminUiPath)) { app.use('/admin', express.static(adminUiPath)); - // SPA fallback for admin routes - app.get('/admin/*', (_req, res) => { + // SPA fallback for admin routes (path-to-regexp v8 requires named wildcards) + app.get('/admin/{*splat}', (_req, res) => { res.sendFile(path.join(adminUiPath, 'index.html')); }); console.log('Admin UI enabled at /admin'); -- knotmirror 0.0.1