cabernetwork / provider_video_m3u

Provides an interface to the M3U and XMLTV.XML URLs
MIT License
2 stars 2 forks source link

Referer url configuration #2

Closed dcardin closed 8 months ago

dcardin commented 12 months ago

Is it possible to set the Referer URL for the m3u channel? My use case will reject the call to the m3u8 if the referer is not set.

rocky4546 commented 12 months ago

Of course it does. In the top of the m3u file, add the following

EXTM3U

EXT-X-SESSION-DATA:DATA-ID='HEADER',VALUE='{"Referer": "https://sitetoadd.com/", "Origin": "https://sitetoadd.com"}'

You can basically add any header name/value item you need and it will send that when talking to the provider. I use it quite often, so I know it works well.

dcardin commented 12 months ago

Meaning I have to load from a local m3u file instead of a url right ? Feels simple enough though. Thanks

dcardin commented 12 months ago

Alright, so there is something I need to do more, because my m3u(8) comes from an https address, so I cannot add the headers to the file being fetched. Suggestions appreciated!

rocky4546 commented 12 months ago

use wget or something similar and do an update using sed, nawk or some kind of tool...

dcardin commented 12 months ago

The m3u is dynamic, as it's a live feed. Fetching the m3u itself needs a referer to get started