owncast/router/middleware/cors.go
2020-11-12 15:14:59 -08:00

11 lines
199 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", "*")
}