Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Enable CORS in the hls handler (#1411)

Y.Horie298541a7d2c7
diff --git a/controllers/hls.go b/controllers/hls.go
index 137d4c02aa..60a22373a4 100644
--- a/controllers/hls.go
+++ b/controllers/hls.go
@@ -45,6 +45,6 @@ func HandleHLSRequest(w http.ResponseWriter, r *http.Request) {
cacheTime := utils.GetCacheDurationSecondsForPath(relativePath)
w.Header().Set("Cache-Control", "public, max-age="+strconv.Itoa(cacheTime))
}
-
+ middleware.EnableCors(&w)
http.ServeFile(w, r, fullPath)
}