From 5fc84657462d6c614020f90b728e196b3633585f Mon Sep 17 00:00:00 2001 From: "Y.Horie" Date: Sat, 18 Sep 2021 05:54:44 +0900 Subject: [PATCH] Enable CORS in the hls handler (#1411) --- controllers/hls.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/hls.go b/controllers/hls.go index 137d4c02a..60a22373a 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) }