I trying to reverse proxy a HLS stream (m3u8).
My nginx config :
server {
server_name proxy.domain.com;
resolver 8.8.8.8;
location / {
set $backend $arg_url;
proxy_pass http://$backend;
}
}
When I try to access the stream with http://proxy.domain.com/hls/live/stream.m3u8?url=stream.domain.com It gives me HTTP/1.1" 200 for the m3u8
"GET /hls/live/stream.m3u8?url=stream.domain.com HTTP/1.1" 200
But after it, it gives HTTP/1.1" 500 error for the .ts file !
"GET /hls/live/20190502T232455-05-14196689.ts HTTP/1.1" 500
When I check the error log file
[error] 32069#32069: *16 invalid URL prefix in "http://", client: MY IP, server: proxy.domain.com, request: "GET /hls/live/20190502T232455-05-14196689.ts HTTP/1.1", host: "proxy.domain.com", referrer: "http://player.url.com/?source=https://proxy.domain/hls/live/stream.m3u8?url=stream.domain.com"
I've tried proxy_pass http://$arg_url; but it's not working too.
Can someone help ?