Skip to content

Instantly share code, notes, and snippets.

@mattmcla
Created April 18, 2016 18:27
Show Gist options
  • Save mattmcla/033f48bd95c1602ef8201392f77f24a1 to your computer and use it in GitHub Desktop.
Save mattmcla/033f48bd95c1602ef8201392f77f24a1 to your computer and use it in GitHub Desktop.
func (s *Server) ServeHTTP (w http.ResponseWriter, r *http.Request) {
w.Header().Set(“Access-Control-Allow-Origin”, “*”)
w.Header().Set(“Access-Control-Allow-Headers”, “Accept, Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization”)
s.r.ServeHTTP(w, r)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment