nosession을 noauth로 교체
This commit is contained in:
@ -23,7 +23,7 @@ import (
|
|||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
)
|
)
|
||||||
|
|
||||||
var noSessionFlag = flagx.Bool("nosession", false, "nosession=[true|false]")
|
var noAuthFlag = flagx.Bool("noauth", false, "")
|
||||||
|
|
||||||
type wsconn struct {
|
type wsconn struct {
|
||||||
*websocket.Conn
|
*websocket.Conn
|
||||||
@ -260,7 +260,7 @@ func (ws *WebsocketHandler) RegisterHandlers(serveMux *http.ServeMux, prefix str
|
|||||||
region = ""
|
region = ""
|
||||||
}
|
}
|
||||||
url := gocommon.MakeHttpHandlerPattern(prefix, region, "ws")
|
url := gocommon.MakeHttpHandlerPattern(prefix, region, "ws")
|
||||||
if *noSessionFlag {
|
if *noAuthFlag {
|
||||||
serveMux.HandleFunc(url, sh.upgrade_nosession)
|
serveMux.HandleFunc(url, sh.upgrade_nosession)
|
||||||
} else {
|
} else {
|
||||||
serveMux.HandleFunc(url, sh.upgrade)
|
serveMux.HandleFunc(url, sh.upgrade)
|
||||||
|
|||||||
Reference in New Issue
Block a user