Strip 'Bearer ' from stream name for WHEP

This commit is contained in:
Charlotte Som 2023-02-23 16:57:07 +00:00
parent 8f8fbef32b
commit d072d921ee

View file

@ -222,6 +222,7 @@ func HandleWHIP(res http.ResponseWriter, req *http.Request) {
func HandleWHEP(res http.ResponseWriter, req *http.Request) {
streamName := req.Header.Get("Authorization")
streamName, _ = strings.CutPrefix(strings.ToLower(streamName), "bearer ")
if streamName == "" {
logHTTPError(res, "Stream name was not set", http.StatusBadRequest)
return