Compare commits

...

1 Commits

Author SHA1 Message Date
langhuihui
a9cb4cd853 增加cors头 2020-11-16 21:23:16 +08:00

View File

@@ -63,6 +63,7 @@ func runPlugin() {
}
})
http.HandleFunc("/rtsp/pull", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "*")
targetURL := r.URL.Query().Get("target")
streamPath := r.URL.Query().Get("streamPath")
if err := new(RTSP).PullStream(streamPath, targetURL); err == nil {