Skip to main content

Sending Crafted HTTP Request Header in Kodi

Technical
Author
Kuan-Yi Li
Table of Contents

Some internet streams are only available from their website. Although the underlying protocol is HTTP streaming, you won’t able to play the media simply by opening the stream URL with Kodi. That is because the streaming server checks your User-Agent and Referer to ensure you’re accessing the stream with browser from certain website.

Sending crafted HTTP request header will allow you to bypass the restriction. Here is how….

Say you have a stream URL:

http://mr.lonely.love/live

For Kodi to send a specified User-Agent and Referer, you’ll have to change the URL to something like:

http://mr.lonely.love/live|User-Agent=Mozilla/5.0&Referer=http://www.lonelyplanet.com/

Note: User-Agent string and Referer string need to be modified accordingly to reflect the browser you’re using and the site you’re on.

Caveat
#

The modified URL won’t work if added to “Favorites” (not sure why), instead, load the URL through M3U or PLS playlist.

References
#