mirror of
https://github.com/Monibuca/plugin-hdl.git
synced 2025-09-27 05:06:05 +08:00
🐛 FIX: 使用自有端口后的streamPath前缀斜杠消除
This commit is contained in:
3
main.go
3
main.go
@@ -119,7 +119,8 @@ func (sub *HDLSubscriber) OnEvent(event any) {
|
||||
}
|
||||
|
||||
func (*HDLConfig) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
streamPath := strings.TrimSuffix(strings.TrimPrefix(r.URL.Path, "/hdl/"), ".flv")
|
||||
streamPath := strings.TrimSuffix(strings.TrimPrefix(r.URL.Path, "/hdl"), ".flv")
|
||||
streamPath = strings.TrimPrefix(streamPath, "/")
|
||||
if r.URL.RawQuery != "" {
|
||||
streamPath += "?" + r.URL.RawQuery
|
||||
}
|
||||
|
Reference in New Issue
Block a user