[addon] return 302 instead of 301 for resolved links

This commit is contained in:
TheBeastLT
2020-04-22 10:22:55 +02:00
parent 3299bc2d06
commit e349a48c1a
3 changed files with 5 additions and 5 deletions

View File

@@ -73,7 +73,7 @@ router.get('/realdebrid/:apiKey/:infoHash/:cachedFileIds/:fileIndex?', (req, res
const { apiKey, infoHash, cachedFileIds, fileIndex } = req.params;
realDebrid.resolve(apiKey, infoHash, cachedFileIds, isNaN(fileIndex) ? undefined : parseInt(fileIndex))
.then(url => {
res.writeHead(301, { Location: url });
res.writeHead(302, { Location: url });
res.end();
})
.catch(error => {