A
A
Alex Goncharov2017-06-06 12:38:58
freepbx
Alex Goncharov, 2017-06-06 12:38:58

Why is the stream not being picked up?

There is a configured server with ngnix-rtmp, rstrm.ru/p.html - you can enter the stream key and watch the stream. These streams are embedded on another site, on a second server. Everything worked until the first reboot. Got an error

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 404.

Is it necessary for the server to allow connecting content from other sites in the header?
Need to add Access-Control-Allow-Origin?
What is the reason?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Svetlana, 2017-06-07
@calirails

You need to add the Access-Control-Allow-Origin header on the server for certain file types. Add to the location section of the nginx.conf file:

location ~ \.(ts|ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$ {
           add_header Access-Control-Allow-Origin "*";
}

The Access-Control-Allow-Origin header with a value of "*" allows the file types listed in brackets to be loaded from any domain.

D
Dimonchik, 2017-06-06
@dimonchik2013

the streamer must allow other people's sources, outside his domain, look for how this is done

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question