go-tour: use new socket interface
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/100090043
diff --git a/gotour/local.go b/gotour/local.go
index b312ed9..2f8ba1d 100644
--- a/gotour/local.go
+++ b/gotour/local.go
@@ -14,6 +14,7 @@
"log"
"net"
"net/http"
+ "net/url"
"os"
"os/exec"
"path/filepath"
@@ -101,7 +102,9 @@
http.HandleFunc("/", rootHandler)
http.HandleFunc("/lesson/", lessonHandler)
- http.Handle(socketPath, socket.Handler)
+
+ origin := &url.URL{Scheme: "http", Host: host + ":" + port}
+ http.Handle(socketPath, socket.NewHandler(origin))
// Keep these static file handlers in sync with ../app.yaml.
static := http.FileServer(http.Dir(root))