mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
12 lines
252 B
Go
12 lines
252 B
Go
package middleware
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
// EnableCors enables the CORS header on the responses.
|
|
func EnableCors(w http.ResponseWriter) {
|
|
w.Header().Set("Access-Control-Allow-Origin", "*")
|
|
w.Header().Set("Access-Control-Allow-Headers", "Range")
|
|
}
|