GoLang: Setting header to null for a file:// to http:// request not working
问题 This answer about static to static (file:// -> file://) states that a webserver (http://) can be used to serve files to a local static page (file://) without violating CORS. And this answer states that when sending data from a webserver to a static page, a header of null must be used. But neither of the two lines below are working, so how do I do it? func handler(w http.ResponseWriter, r *http.Request) { w.Header().Add("Access-Control-Allow-Origin", nil) //this line fmt.Fprintf(w, "Hi there,