fix: Backend path error fix

This commit is contained in:
Honey committed 2026-05-03 14:55:36 +02:00
1 parent 0276894ed9
commit 88999d30ca
1 file changed
+1 -1
+1 -1
View File
@@ -385,7 +385,7 @@ app.get('/api/jobs', (req, res) => {
// Forwards API calls to Audiobookshelf to avoid CORS restrictions in the browser. // Forwards API calls to Audiobookshelf to avoid CORS restrictions in the browser.
// The browser sends X-ABS-URL and X-ABS-Token headers; audio streaming uses // The browser sends X-ABS-URL and X-ABS-Token headers; audio streaming uses
// direct <audio src> URLs and is unaffected by CORS. // direct <audio src> URLs and is unaffected by CORS.
app.all('/api/abs-proxy/*', async (req, res) => { app.all('/api/abs-proxy/*path', async (req, res) => {
const absBase = req.headers['x-abs-url']; const absBase = req.headers['x-abs-url'];
const absToken = req.headers['x-abs-token']; const absToken = req.headers['x-abs-token'];
if (!absBase || !absToken) { res.status(400).json({ error: 'Missing X-ABS-URL or X-ABS-Token' }); return; } if (!absBase || !absToken) { res.status(400).json({ error: 'Missing X-ABS-URL or X-ABS-Token' }); return; }