PeterJCLaw / srcomp-puppet

Student Robotics Competition Server
https://github.com/PeterJCLaw/srcomp/wiki/Component-Overview#srcomp-puppet
MIT License
0 stars 4 forks source link

Ensure CORS header is being correctly sent #13

Closed RealOrangeOne closed 3 years ago

RealOrangeOne commented 3 years ago

No CORS header is being sent for srcomp-stream, causing issues connecting from some browser.

image

Steps to reproduce

  1. Have public comp box deployed
  2. Clone and build livestream-overlay
  3. Use python -m http.server to serve overlay
  4. Browse to overlay in browser (Firefox in this case), notice console errors

Disabling CORS protection using https://addons.mozilla.org/en-US/firefox/addon/cors-everywhere/ appears to resolve the issue.

RealOrangeOne commented 3 years ago

This is in fact a URL issue /stream/ doesn't send a CORS header, and is also the incorrect URL. /stream is the correct URL, which sets CORS correctly.