Skip to content

Instantly share code, notes, and snippets.

@vmihailenco
Created May 2, 2013 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vmihailenco/5502384 to your computer and use it in GitHub Desktop.
Save vmihailenco/5502384 to your computer and use it in GitHub Desktop.
import (
"net/http"
)
func init() {
http.Handle("/", proxyHandler)
}
func proxyHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "*")
http.DefaultServeMux.ServeHTTP(w, r)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment