Enable CORS in the hls handler (#1411)
This commit is contained in:
@@ -45,6 +45,6 @@ func HandleHLSRequest(w http.ResponseWriter, r *http.Request) {
|
|||||||
cacheTime := utils.GetCacheDurationSecondsForPath(relativePath)
|
cacheTime := utils.GetCacheDurationSecondsForPath(relativePath)
|
||||||
w.Header().Set("Cache-Control", "public, max-age="+strconv.Itoa(cacheTime))
|
w.Header().Set("Cache-Control", "public, max-age="+strconv.Itoa(cacheTime))
|
||||||
}
|
}
|
||||||
|
middleware.EnableCors(&w)
|
||||||
http.ServeFile(w, r, fullPath)
|
http.ServeFile(w, r, fullPath)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user