A couple friends and I are working on a video hosting / sharing platform and none of us have worked with CORS before. From what I've read, it allows third parties to display or alter your data?
Our goal is to integrate our video hosting website with the RES (Reddit Enhancement Suite) browser plugin This will allow our videos automatically embedded inside Reddit, similar to how YouTube and Imgur is.
The RES team asks for a client-side js file, which they offer examples here: https://github.com/honestbleeps/Reddit-Enhancement-Suite/blob/master/lib/modules/hosts/example.js
Then, you need to make sure CORS is correctly setup for XHR. After inspecting my page that displays the videos, I assume this is what needs to be available for them:
http://i.imgur.com/DLo6r6T.jpg
Because RES is open source, I can compile a version of RES using my client-side script and be able to test on my own. I can't figure out how to use CORS correctly. I've read a lot about it, but would really appreciate at a nudge in the right direction.
I have two routes that have to do with my videos. Here they are below:
//video routes
app.route('/media').get(articles.getVideos);
app.route('/media/:id').get(articles.play);
If there's anything else needed for me to provide, let me know. Thanks!