diff --git a/backend/novasonic-server.js b/backend/novasonic-server.js index 2d97ad3..50006d3 100644 --- a/backend/novasonic-server.js +++ b/backend/novasonic-server.js @@ -327,7 +327,9 @@ app.get('/api/itunes/:endpoint', (req, res) => { // Deezer API proxy — the search source (Apple's /search returns 403 from server IPs). Deezer is // free, needs no key, and returns explicit versions + artist images + track durations. Covers // /search, /search/album, /search/artist, /album/{id}, /album/{id}/tracks, /artist/{id}/albums, … -app.get('/api/deezer/*', (req, res) => { +// Regex route (not '/api/deezer/*') — a bare "*" is an invalid path pattern in Express 5 and +// crashes the server at startup, taking every endpoint down with it. +app.get(/^\/api\/deezer\/(.+)/, (req, res) => { const sub = String(req.params[0] || '').replace(/[^a-zA-Z0-9/_-]/g, ''); const qs = new URLSearchParams(req.query).toString(); const target = `https://api.deezer.com/${sub}${qs ? '?' + qs : ''}`;