fix: Backend path error fix
This commit is contained in:
1 parent
0276894ed9
commit
88999d30ca
1 file changed
+1
-1
@@ -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; }
|
||||||
|
|||||||
Reference in new issue
Block a user