chore: upgrade Express 4 → 5 and fix wildcard route for path-to-regexp v8 (closes #54)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ulas Kalayci
2026-04-18 22:23:57 +02:00
parent 6746a5a175
commit 6fee35d1d9
4 changed files with 305 additions and 226 deletions
+1 -1
View File
@@ -189,7 +189,7 @@ const spaLimiter = rateLimit({
// --------------------------------------------------------
// SPA Fallback: Alle nicht-API-Routen → index.html
// --------------------------------------------------------
app.get('*', spaLimiter, (req, res) => {
app.get('/{*path}', spaLimiter, (req, res) => {
if (req.path.startsWith('/api/')) {
return res.status(404).json({ error: 'Nicht gefunden.', code: 404 });
}