fix: adjust WebSocket buffer sizes in terminal and host API (#11094)

This commit is contained in:
KOMATA 2025-11-27 11:22:33 +08:00 committed by GitHub
parent dc9fdf897b
commit e32a11910e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -228,8 +228,8 @@ func wshandleError(ws *websocket.Conn, err error) bool {
}
var upGrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024 * 1024 * 10,
ReadBufferSize: 4096,
WriteBufferSize: 16384,
CheckOrigin: func(r *http.Request) bool {
return true
},

View file

@ -327,8 +327,8 @@ func (b *BaseApi) WsSsh(c *gin.Context) {
}
var upGrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024 * 1024 * 10,
ReadBufferSize: 4096,
WriteBufferSize: 16384,
CheckOrigin: func(r *http.Request) bool {
return true
},