crossws
crossws copied to clipboard
Enable permessage-deflate to have websocket compression
Describe the feature
Hi, first thanks to this very cool library and the integration with nitro and nuxt.
Is it possible to have Sec-WebSocket-Extensions: permessage-deflate when answering a client connection ? Currently it does not respond to enabling permessage-deflate when the client ask to like on this one :
I have Sec-WebSocket-Extensions: permessage-deflate on the request header but nothing on the response header.
Additional information
- [ ] Would you be willing to help implement this feature?
Is having this sufficient inside the defineWebSocketHandler object ?
upgrade(req) {
return {
headers: {
"sec-websocket-extensions": "permessage-deflate",
},
};
},
Closing assuming setting headers would be enough. i couldn't find any cross platform API for it also.