aboutsummaryrefslogtreecommitdiff
path: root/route.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-03-28 15:51:40 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-03-28 15:51:40 +0200
commit9a4e0f70c967c3905e4430824f420ce2dd68a92f (patch)
treed142dff9687d12b1fcb2fd2666f77795fead8d75 /route.go
parentd97fab561070205d57f756015cf9e85a559a573e (diff)
Pass test
Diffstat (limited to 'route.go')
-rw-r--r--route.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/route.go b/route.go
index 2fc38b3..8f77120 100644
--- a/route.go
+++ b/route.go
@@ -68,10 +68,16 @@ func (s *Server) Restore() error {
//mux.Handle(v.ServerName, httputil.NewSingleHostReverseProxy(up))
switch up.Scheme {
case "ws":
+ //log.Println("ws", v.ServerName, up)
mux.Handle(v.ServerName, NewWebSocketProxy(up))
default:
+ //log.Println("http", v.ServerName, up)
mux.Handle(v.ServerName, NewReverseProxy(up))
}
+ mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
+ //log.Printf("%+v\n", r)
+ http.Error(w, "gone", http.StatusGone)
+ })
}
s.Server.Handler = mux
return nil