go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

Questions about CORS preflight requiring authorization.

Open ns-mglaske opened this issue 1 year ago • 1 comments

I'm trying to setup ReactPlayer with HLS to stream video from go2rtc. It seems that hls.js when doing it's pre-flight check, doesn't send auth for the OPTIONS check, and go2rtc is responding with 401 Unauthorized for that request. (From what I've read, generally OPTIONS preflight are not required to do auth). There seems to be some work-arounds for this, by telling hls.js to send it's xhr request 'withCredentials', however, that doesn't work with Access-Control-Allow-Origin: *, which seems to be the only option supported by go2rtc (per the docs). So it seems I'm a bit stuck here.

Would it be possible to prevent the OPTIONS request from requiring auth ?

ns-mglaske avatar Dec 30 '23 15:12 ns-mglaske

How I can repeat your situation?

AlexxIT avatar May 19 '24 04:05 AlexxIT

No feedback

AlexxIT avatar May 26 '24 06:05 AlexxIT