Files
orly/pkg/protocol/socketapi/upgrader.go
2025-07-17 13:18:55 +01:00

18 lines
417 B
Go

package socketapi
import (
"net/http"
"github.com/fasthttp/websocket"
)
// Upgrader is a preconfigured instance of websocket.Upgrader used to upgrade
// HTTP connections to WebSocket connections with specific buffer sizes and a
// permissive origin-checking function.
var Upgrader = websocket.Upgrader{
ReadBufferSize: 1024, WriteBufferSize: 1024,
CheckOrigin: func(r *http.Request) bool {
return true
},
}