Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: String replace in .m3u8 file

$
0
0
I resolve problem with lua code :

location /hls01{
more_set_headers 'Content-Type: text/plain';
proxy_pass http://domen.com/test/playlist.m3u8;
}

location /newhls01{
default_type 'text/plain';

content_by_lua '
local res = ngx.location.capture("/hls01")
if res.status == 200 then
izmena = ngx.re.gsub(res.body, "EXTM3U", "newstring")
ngx.print(izmena)
end';
}

Thanks for your help

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>