🛂 查看密码导致的 WebSSH 不可用

This commit is contained in:
naiba
2021-08-20 13:50:25 +08:00
parent fb7e54a3af
commit 56ebc432d5
4 changed files with 3 additions and 10 deletions

View File

@@ -63,13 +63,6 @@ const (
networkTimeOut = time.Second * 5 // 普通网络超时
)
type windowSize struct {
Rows uint16 `json:"rows"`
Cols uint16 `json:"cols"`
X uint16
Y uint16
}
func main() {
// 来自于 GoReleaser 的版本号
monitor.Version = version

View File

@@ -37,13 +37,13 @@ type commonPage struct {
func (cp *commonPage) serve() {
cr := cp.r.Group("")
cr.Use(mygin.Authorize(mygin.AuthorizeOption{}))
cr.GET("/terminal/:id", cp.terminal)
cr.POST("/view-password", cp.issueViewPassword)
cr.Use(cp.checkViewPassword) // 前端查看密码鉴权
cr.GET("/", cp.home)
cr.GET("/service", cp.service)
cr.GET("/ws", cp.ws)
cr.POST("/terminal", cp.createTerminal)
cr.GET("/terminal/:id", cp.terminal)
}
type viewPasswordForm struct {