do not pass http.ResponseWriter as pointer to EnableCors (#1440)
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// EnableCors enables the cors header on the responses.
|
||||
func EnableCors(w *http.ResponseWriter) {
|
||||
(*w).Header().Set("Access-Control-Allow-Origin", "*")
|
||||
// EnableCors enables the CORS header on the responses.
|
||||
func EnableCors(w http.ResponseWriter) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user