mirror of
https://github.com/Monibuca/plugin-rtsp.git
synced 2025-09-27 03:56:08 +08:00
增加cors头
This commit is contained in:
1
main.go
1
main.go
@@ -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 {
|
||||
|
Reference in New Issue
Block a user