fix(server): use regex catch-all (Express 5 wildcard syntax change)

This commit is contained in:
2026-05-31 22:00:38 +01:00
parent 58074a0afb
commit d27381cae3
+1 -1
View File
@@ -53,7 +53,7 @@ const __dirname = path.dirname(__filename);
const clientDist = path.resolve(__dirname, '../../client/dist');
if (existsSync(clientDist)) {
app.use(express.static(clientDist, { index: false, maxAge: '1h' }));
app.get('*', (req, res, next) => {
app.get(/.*/, (req, res, next) => {
// Don't shadow API or well-known paths.
if (req.path.startsWith('/api') || req.path.startsWith('/.well-known')) return next();
res.sendFile(path.join(clientDist, 'index.html'));