fix: wildcard path for express 5

This commit is contained in:
2026-03-14 15:53:50 +00:00
parent 1d744df55e
commit 4be695886f
3 changed files with 17 additions and 1 deletions

View File

@@ -75,7 +75,7 @@ app.get('/health', (req, res) => {
const clientPath = path.join(process.cwd(), 'dist', 'client');
if (fs.existsSync(clientPath)) {
app.use(express.static(clientPath));
app.get('*', (req, res) => {
app.get('/*', (req, res) => {
if (!req.path.startsWith('/api') && !req.path.startsWith('/uploads')) {
res.sendFile(path.join(clientPath, 'index.html'));
}