Browse Source

Enable CORS in the hls handler (#1411)

pull/1416/head
Y.Horie 4 years ago committed by GitHub
parent
commit
5fc8465746
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      controllers/hls.go

2
controllers/hls.go

@ -45,6 +45,6 @@ func HandleHLSRequest(w http.ResponseWriter, r *http.Request) { @@ -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)
}

Loading…
Cancel
Save