I am working on a web project, I just started using a JavaScript based video player in Wordpress. The video player works fine when using videos on the same server but when requesting videos from other servers it throws the error in browser console:
Failed to load http://techslides.com/demos/sample-videos/small.mp4: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.gozo.kitchen' is therefore not allowed access
I am trying to access the video on a different server.
I have tried locating the server configuration file but I cannot find it here's a summary of what I have done till now :
Server is running the linux operating system. I can find the nginx.config but its empty and enabling it to use CORS does not seem to solve the problem. The video still does not run.
There is no config file under the etc directory.
I need to enable CORS to access videos on other servers.
You're requesting a resource from another server so the other server must allow you to retrieve it with an
Access-Control-Allow-Origin
header that matches your site details. You can disable this when you start chrome with the--disable-web-security
flag but that should only be used for testing.