do not pass http.ResponseWriter as pointer to EnableCors (#1440)

This commit is contained in:
Tim Cooper
2021-10-01 14:40:13 -05:00
committed by GitHub
parent fa77f6396d
commit fe47c99ac2
6 changed files with 9 additions and 9 deletions

View File

@@ -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", "*")
}