+1 have the same problem, any work around?
I just encountered the same problem after I changed the publish url to be over https. anyone any ideas?
@aefox Hi! ,I solved it through the following ways
rtmp {
...
on_publish http://127.0.0.1:8334/rtmp_redirect_lua;
...
}
server {
listen 8334;
server_name 127.0.0.1;
resolver 8.8.8.8;
location ~* /rtmp_redirect_lua {
#lua_code_cache off;
access_by_lua_file /usr/local/openresty/nginx/conf/lua/rtmp_auth_key.lua;
}
}
local httpc = http.new()
local resp, err = httpc:request_uri("https://www.tinywan.com", {
method = "GET",
--path = "/Stream/luaHttpRequest?"..args_string,
path = "/stream/privatePushCallbackUrl?"..args_string,
headers = {
["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36"
},
ssl_verify = false -- must
})
if not resp then
LOG(ERR, "resty.http API request error :", err)
return
end
if resp.status ~= ngx.HTTP_OK then
LOG(ERR, "request error, status :", resp.status)
return
end
if resp.status == ngx.HTTP_FORBIDDEN then
LOG(ERR, "request error, status :", resp.status)
return
end
if tostring(resp.body) ~= "200" then
LOG(ERR,"Https APi is Fail return-value = "..resp.body)
return
end
httpc:close()
return 200
Most helpful comment
+1 have the same problem, any work around?