Skip to content

Commit

Permalink
catalyst-node: handle vod source urls without hitting load-balancer
Browse files Browse the repository at this point in the history
  • Loading branch information
emranemran committed Sep 29, 2022
1 parent b7a3e9a commit 3aec869
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/catalyst-node/catalyst-node.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,13 @@ func streamSourceHandler(lat, lon float64) http.Handler {
}
streamName := string(b)
glog.V(7).Infof("got mist STREAM_SOURCE request=%s", streamName)

// if VOD source is detected, return empty response to use input URL as configured
if strings.HasPrefix(streamName, "tr_src_") {
w.Write([]byte(""))
return
}

latStr := fmt.Sprintf("%f", lat)
lonStr := fmt.Sprintf("%f", lon)
dtscURL, err := queryMistForClosestNodeSource(streamName, latStr, lonStr, "", true)
Expand Down

0 comments on commit 3aec869

Please sign in to comment.