Answer the question
In order to leave comments, you need to log in
Why does the No 'Access-Control-Allow-Origin' header is present... error occur?
An error occurred
They said that you need to add the following lines to the nginx.conf configuration file
server{
location ~* \.(mp4|avi)$ {
add_header Access-Control-Allow-Origin *;
}
}
Answer the question
In order to leave comments, you need to log in
This happens when you insert someone else's content through an iframe. Accordingly add_header Access-Control-Allow-Origin *; should not be registered with you, but on the source
This article helped me at one time:
https://learn.javascript.ru/xhr-crossdomain
One heading "Access-Control-Allow-Origin" was not enough to remember.
I'm shocked)
Read the documentation, those who understand something about this have already stopped answering you))
nginx.org/ru/docs/http/request_processing.html
You will
read this and you will understand why your example from the question does not work)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question