最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

node.js - Why am I getting 403 Forbidden for m3u8 link when deployed node app - Stack Overflow

programmeradmin4浏览0评论

Problem: I'm trying to deploy my Node.js Stremio addon to Vercel, which is supposed to return some M3U8 stream links for movies.

Issue:

When I run the addon locally, I send a request to the embed video player URL, and I can successfully get the working M3U8 link from the unpacked JS code. However, when I deploy it to Vercel, the same process doesn’t work. I do get the M3U8 link, but it returns a 403 Forbidden error from the Nginx server. Question: Is there any way to bypass this issue and make it work in the deployed version?

I'm using axios to make a request and unpacker to retrive m3u8 link

const streamProviderUrl = ";;
const { data: streamProviderData } = await axios.get(streamProviderUrl);
const unpacked = unpacker.unpack(streamProviderData);
const streamUrlMatch = unpacked.match(/file:"([^"]+)"/i);
const streamUrl = streamUrlMatch ? streamUrlMatch[1] : null;

Example of working one:

.m3u8?t=a7HrJxHedjJc7E8u3TN1TVT-OoilncEebNnzxPlGh08&s=1741445418&e=129600&f=11408281&srv=9CCbT1vHqSzs&i=0.4&sp=500&p1=9CCbT1vHqSzs&p2=9CCbT1vHqSzs&asn=2860

Example of non working one:

.m3u8?t=2FaAkAJuQUPLyspVuPVS204ygIKX4CMd8Rl1uyKDIRE&s=1741448120&e=129600&f=10621413&srv=aMrD2gI94v8g&i=0.4&sp=500&p1=aMrD2gI94v8g&p2=aMrD2gI94v8g&asn=14618

Thanks in advance! :)

发布评论

评论列表(0)

  1. 暂无评论