Accept "irc" WebSocket subprotocol
git-svn-id: file:///srv/svn/repo/suika/trunk@348 f0ae65fe-ee39-954e-97ec-027ff2717ef4
This commit is contained in:
parent
51df0c157e
commit
3367f4ebd8
@ -146,6 +146,7 @@ func (s *Server) Serve(ln net.Listener) error {
|
||||
func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
conn, err := websocket.Accept(w, req, &websocket.AcceptOptions{
|
||||
OriginPatterns: s.HTTPOrigins,
|
||||
Subprotocols: []string{"irc"},
|
||||
})
|
||||
if err != nil {
|
||||
s.Logger.Printf("failed to serve HTTP connection: %v", err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user