mirror of
https://github.com/owncast/owncast.git
synced 2024-11-25 06:12:23 +03:00
Enable CORS in the hls handler (#1411)
This commit is contained in:
parent
5f3cecced5
commit
5fc8465746
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue