Skip to content

mish-tv/m3u8-query-proxy

Repository files navigation

@mish-tv/m3u8-query-proxy

npm Build and test coverage license

`@mish-tv/m3u8-query-proxy` is a proxy server that adds a query to the value of a URI.

This is designed to be used to give CDN authentication tokens when playing hls in iOS browsers.

Usage

npm install -g @mish-tv/m3u8-query-proxy@0.0.5
M3U8_ORIGIN="https://cdn.example.com" REMOVE_PATH="/foo" m3u8-query-proxy
curl http://localhost:8080/foo/bar.m3u8?token=baz

If you make a request as shown above, the proxy will request to https://cdn.example.com/bar.m3u8?token=baz.
It will rewrite the response as needed.
Refer to the test to see how to rewrite the response.