How to allow https to access content from wowza http link?

267 views Asked by At

I have one question. Recently i have get link from my streaming server to play in my website. My streaming server use http link but my website use https ssl. During i get the link to play it cannot get content from my streaming server by show the following error:

enter image description here

I am looking forward to hearing from all of you soon.

Thanks in advance.

Best Regards,

Chhenghong

1

There are 1 answers

10
shaochuancs On

This error happens because you cannot access HTTP resource from HTTPS page, for security consideration. It is the browser behaviour.

To fix this issue, a proxy endpoint can be made in server side, such as /proxy/playlist.m3u8, which accept HTTP GET request. The browser will fetch the resource from https://<your-server>/proxy/playlist.m3u8, as if it is stored in your host. As it is an HTTPS request, no error.

In the server side, when GET request to /proxy/playlist.m3u8 is listened, the HTTP request would be proxied to your streaming server (send GET request to the streaming server with all headers, parameters and body). When the response from streaming server is received, the response would be returned to browser directly, with all response headers and data.

As the HTTP request to streaming server happens in your server side, the restriction logic from browser does not apply any more.

For example, if the server is written in Node.js, with Express and request module, the proxy endpoint would look like:

app.get('/proxy/playlist.m3u8', function(req, res) {
  req.pipe(request('http://<streaming-server>/path/playlist.m3u8')).pipe(res);
});