diff --git a/context/input.go b/context/input.go index bbdda3a8..303f10cc 100644 --- a/context/input.go +++ b/context/input.go @@ -74,6 +74,10 @@ func (input *BeegoInput) IsSecure() bool { return input.Scheme() == "https" } +func (input *BeegoInput) IsWebsocket() bool { + return input.Header("Upgrade") == "websocket" +} + func (input *BeegoInput) IsUpload() bool { return input.req.MultipartForm != nil }