Eyevinn / srt-whep

SRT to WHEP (WebRTC)
Apache License 2.0
80 stars 10 forks source link

Handle OPTIONS request #47

Closed birme closed 1 year ago

birme commented 1 year ago

This is not (yet) regulated in the WHEP protocol but from a general HTTP endpoint perspective it is good if the endpoint handles OPTIONS request, e.g.

curl -X OPTIONS -v "https://srtwhep.lab.sto.eyevinn.technology:8443/channel"

Expected to return the following headers and status code 204, e.g:

< HTTP/1.1 204 No Content
< Server: nginx/1.14.0 (Ubuntu)
< Date: Mon, 21 Aug 2023 07:34:44 GMT
< Connection: keep-alive
< vary: Origin, Access-Control-Request-Headers
< access-control-allow-origin: *
< access-control-expose-headers: Location, Accept, Allow, Accept-POST
< access-control-allow-methods: POST, GET, OPTIONS, PATCH, PUT
< accept-post: application/sdp
<