]> git.scottworley.com Git - reliable-chat/commitdiff
/speak requests are permitted cross-origin
authorScott Worley <sworley@chkno.net>
Sun, 19 Aug 2012 16:54:53 +0000 (09:54 -0700)
committerScott Worley <sworley@chkno.net>
Sun, 19 Aug 2012 16:54:53 +0000 (09:54 -0700)
This serves only to quite browser console error messages.
The request is the action, and speaking was working even though the
browser was denying the empty response to the client.

server/server.go

index c3bb59310b8ff28195f299b664cb0bd495c2c03c..963931f696d759459f6cb90512cd796100f88fcb 100644 (file)
@@ -184,6 +184,7 @@ func start_server(store Store) {
                        now(),
                        r.FormValue("id"),
                        r.FormValue("text")}
                        now(),
                        r.FormValue("id"),
                        r.FormValue("text")}
+               w.Header().Add("Access-Control-Allow-Origin", "*")
        })
 
        http.HandleFunc("/robots.txt", func(w http.ResponseWriter, r *http.Request) {
        })
 
        http.HandleFunc("/robots.txt", func(w http.ResponseWriter, r *http.Request) {