Open Georgisim opened 3 years ago
The location pointed by vod_upstream_location
is expected to be a location with proxy_pass, rewrite is indeed not supported.
If the goal is to remove the /hls prefix it can be achieved easily without rewrite - for your example, something like this -
location ~ ^/origin/(hls|dash)(/.*)$ {
proxy_pass http://127.0.0.1/8082/$2;
proxy_set_header Host $http_host;
}
Hi guys,
I've found a situation where I can crash vod-module with specific request:
george@george-desktop:~/work/git/merge/vod/nginx-1.17.10$ curl -v http://127.0.0.1:8088/hls/hls/some_video.mp4/master.m3u8/index.m3u8
nginx version is 1.17.10 and vod module is 1.27 tag
here is my minimal config where I can still reproduce it:
george@george-desktop:~/work/git/merge/vod/nginx-1.17.10/run$ cat conf/nginx.conf
This is the backtrace:
It seems to me that ctx->callback points to something that is not beginning of function. Also upstream is NULL
(gdb) p u $1 = (ngx_http_upstream_t *) 0x0 (gdb)
It there is not rewrite location ( location /origin/ ) in my config - it does not crash. I suspect this fix is causing the issue [(https://github.com/kaltura/nginx-vod-module/commit/3d0ab1cbe32a5d1d3ad99c735b16be19e78dbd02#diff-9abbbcaa76d4d09c33e94eb383ecc384]) because without it, we will exit this function here :
line 109 in old code:
I have a simple workaround, but I'm not sure it's the best one and fit original original author.
If you need more info, just contact me.