Strip 'Bearer ' from stream name for WHEP

main
Charlotte Som 2023-02-23 16:57:07 +00:00
parent 8f8fbef32b
commit d072d921ee
1 changed files with 1 additions and 0 deletions

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