Current CORS support only adds an Access-Control-Allow-Origin header to some requests. It also does not support the OPTIONS preflight sent by modern browsers. This commit adds support for OPTIONS preflight as well as more CORS headers.
The OPTIONS preflight is sent without any credentials attached to it so it mist take place before Authorization header processesing. Firefox 99 requires other access control headers like Access-Control-Allow-Headers be returned for a successful CORS interaction.
Signed-off-by: Ayrton Sparling <ayrton@sparling.us>
* Setup guide for H.264
* Phrasing, structure
* Remove MJPEG primer and rewrite intro
* Link to library files directly
* Adjust page title
* Remove todo
* Resolve todo (Janus setup)
* Comment all JavaScript
* Rephrase to use active voice, clarify details
* Phrasing and clarifications
* Write backend instructions
* Grammar
* Use generic URL with port number
* Use consistent terminology
* Use term “V4L2 device” to refer to the video device
* Link “building” section of uStreamer README
* Use active voice
* Change page title to “demo”
* Add comment about the `janus.js` library file
* Use window location to construct server URL
* Move `videoElement` variable closer to it’s usage
* Elaborate why we clone the media stream
* Drop obsolete `WITH_OMX` option
* Correct path of shared object file
* Fix shadowing variable of same name
* Send `start` request to avoid (harmless) `400` response
* Add `refcount.h` fix
Co-authored-by: Jan Heuermann <jan@jotaen.net>