diff --git a/wshandler/wshandler.go b/wshandler/wshandler.go index 0f0e9d1..c552e37 100644 --- a/wshandler/wshandler.go +++ b/wshandler/wshandler.go @@ -23,7 +23,7 @@ import ( "github.com/gorilla/websocket" ) -var noSessionFlag = flagx.Bool("nosession", false, "nosession=[true|false]") +var noAuthFlag = flagx.Bool("noauth", false, "") type wsconn struct { *websocket.Conn @@ -260,7 +260,7 @@ func (ws *WebsocketHandler) RegisterHandlers(serveMux *http.ServeMux, prefix str region = "" } url := gocommon.MakeHttpHandlerPattern(prefix, region, "ws") - if *noSessionFlag { + if *noAuthFlag { serveMux.HandleFunc(url, sh.upgrade_nosession) } else { serveMux.HandleFunc(url, sh.upgrade)