mirror of
https://github.com/Monibuca/plugin-hdl.git
synced 2025-10-04 16:32:42 +08:00
增加cors
This commit is contained in:
1
main.go
1
main.go
@@ -38,6 +38,7 @@ func HDLHandler(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
if s := FindStream(stringPath); s != nil {
|
||||
//atomic.AddInt32(&hdlId, 1)
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
w.Header().Set("Transfer-Encoding", "chunked")
|
||||
w.Header().Set("Content-Type", "video/x-flv")
|
||||
w.Write(avformat.FLVHeader)
|
||||
|
Reference in New Issue
Block a user