nosession을 noauth로 교체

This commit is contained in:
2023-08-01 14:17:47 +09:00
parent 1dff16a86e
commit b501160efc

View File

@ -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)