stremio-addon-sdk icon indicating copy to clipboard operation
stremio-addon-sdk copied to clipboard

Pass HTTP Headers on Streams

Open qwertyuiop8899 opened this issue 2 months ago • 4 comments

Hi All, I'm trying to use http headers correctly but it seems to not work, i followed. https://github.com/Stremio/stremio-addon-sdk/blob/master/docs/api/responses/stream.md and the issue opened in the past https://github.com/Stremio/stremio-addon-sdk/issues/55

but it still not working.

[DEBUG-GD] Stream: {
  title: '[🌐Gd1] CANALE [ITA]',
  url: 'https://ava.test.com/wind/premium881/mono.m3u8...',
  hasBehaviorHints: true,
  behaviorHints: { notWebReady: true, proxyHeaders: { request: [Object] } },
  allKeys: [ 'name', 'title', 'url', 'behaviorHints' ]
}
[DEBUG-GD] proxyHeaders completo: {
  "request": {
    "Referer": "https://en.test.top/",
    "Origin": "https://en.test.top",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36"
  }
}

the same link with the MediaflowProxy header wrap is working correctly.

https://linkMFP/proxy/hls/manifest.m3u8?api_password=mfp&d=https%3A%2F%2Fava.test.com%2Fwind%2Fpremium881%2Fmono.m3u8&h_Referer=https%3A%2F%2Fen.test.top%2F&h_Origin=https%3A%2F%2Fen.test.top&h_User-Agent=Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F135.0.0.0%20Safari%2F537.36

The links are fake, it's only an example. request: [Object] is a link to

  "request": {
    "Referer": "https://en.test.top/",
    "Origin": "https://en.test.top",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36"
  }
}

any hint?

qwertyuiop8899 avatar Oct 24 '25 10:10 qwertyuiop8899

the full behaviorhints is

{
  "behaviorHints": {
    "notWebReady": true,
    "proxyHeaders": {
      "request": {
        "Referer": "https://en.test.top/",
        "Origin": "https://en.test.top",
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36"
      }
    }
  }
}

qwertyuiop8899 avatar Oct 24 '25 10:10 qwertyuiop8899

@qwertyuiop8899 what are you using for testing? notWebReady = true means it won't work on stremio-web, it requires the local streaming server to be running for the proxy to work (which is bundled with the stremio apps)

dexter21767-dev avatar Oct 31 '25 04:10 dexter21767-dev

@qwertyuiop8899 what are you using for testing? notWebReady = true means it won't work on stremio-web, it requires the local streaming server to be running for the proxy to work (which is bundled with the stremio apps)

AAA i so misread the notWebReady , i'm trying to reproduce that content on android Google tv streamer, running the server with my addon locally, addon installed on Android tv and try to reproduce that content, so i should try with false?

qwertyuiop8899 avatar Oct 31 '25 10:10 qwertyuiop8899

@qwertyuiop8899 what are you using for testing? notWebReady = true means it won't work on stremio-web, it requires the local streaming server to be running for the proxy to work (which is bundled with the stremio apps)

mmm no i cant use false, because the link is a m3u8, hls. so it s not mp4 and so i should use true right?

i tried bot normal stremio and beta, for the exoplayer changes but it's the same

qwertyuiop8899 avatar Oct 31 '25 10:10 qwertyuiop8899