Strip 'Bearer ' from stream name for WHEP
This commit is contained in:
parent
8f8fbef32b
commit
d072d921ee
1 changed files with 1 additions and 0 deletions
|
@ -222,6 +222,7 @@ func HandleWHIP(res http.ResponseWriter, req *http.Request) {
|
||||||
|
|
||||||
func HandleWHEP(res http.ResponseWriter, req *http.Request) {
|
func HandleWHEP(res http.ResponseWriter, req *http.Request) {
|
||||||
streamName := req.Header.Get("Authorization")
|
streamName := req.Header.Get("Authorization")
|
||||||
|
streamName, _ = strings.CutPrefix(strings.ToLower(streamName), "bearer ")
|
||||||
if streamName == "" {
|
if streamName == "" {
|
||||||
logHTTPError(res, "Stream name was not set", http.StatusBadRequest)
|
logHTTPError(res, "Stream name was not set", http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue