Fix: Compatibility with Express 5 wildcard routes

This commit is contained in:
choibk 2026-01-23 21:49:00 +09:00
parent afdccb29dc
commit 53eb326cbe

View File

@ -168,7 +168,7 @@ if (fs.existsSync(clientDistPath)) {
app.use(express.static(clientDistPath));
// SPA Fallback: Any route not handled by API should return index.html
app.get('*', (req, res) => {
app.get('(.*)', (req, res) => {
if (!req.path.startsWith('/api')) {
res.sendFile(path.join(clientDistPath, 'index.html'));
}