适配引擎修改

This commit is contained in:
dexter
2023-04-04 20:21:30 +08:00
parent 4ccc056fcc
commit f6f8a74953
3 changed files with 21 additions and 13 deletions

View File

@@ -130,8 +130,7 @@ func (sub *HDLSubscriber) WriteFlvHeader() {
}
func (c *HDLConfig) ServeHTTP(w http.ResponseWriter, r *http.Request) {
streamPath := strings.TrimSuffix(strings.TrimPrefix(r.URL.Path, "/hdl"), ".flv")
streamPath = strings.TrimPrefix(streamPath, "/")
streamPath := strings.TrimSuffix(strings.TrimPrefix(r.URL.Path, "/"), ".flv")
if r.URL.RawQuery != "" {
streamPath += "?" + r.URL.RawQuery
}