Take control over your live stream video by running it yourself. Streaming + chat out of the box.
HTML activitypubbroadcastingchatdecentralizedfederationfediversegolanghacktoberfesthlslivelivestreamowncastrtmpself-hostedstreaming-videovideo
Enable CORS on web server
Gabe Kangas1c45e1135895
diff --git a/main.go b/main.goindex c2c0e5b6fe..400e9768d5 100644--- a/main.go+++ b/main.go@@ -51,6 +51,7 @@ func startChatServer() {// static fileshttp.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {+ enableCors(&w)http.ServeFile(w, r, path.Join("webroot", r.URL.Path))if path.Ext(r.URL.Path) == ".m3u8" {@@ -66,6 +67,10 @@ func startChatServer() {log.Fatal(http.ListenAndServe(":"+strconv.Itoa(configuration.WebServerPort), nil))}+func enableCors(w *http.ResponseWriter) {+ (*w).Header().Set("Access-Control-Allow-Origin", "*")+}+func getStatus(w http.ResponseWriter, r *http.Request) {status := Status{Online: stats.IsStreamConnected(),