Enable CORS in the hls handler (#1411)

This commit is contained in:
Y.Horie 2021-09-18 05:54:44 +09:00 committed by GitHub
parent 5f3cecced5
commit 5fc8465746
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
}