Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable permessage-deflate to have websocket compression #18

Open
1 task
Yasso9 opened this issue Mar 1, 2024 · 1 comment
Open
1 task

Enable permessage-deflate to have websocket compression #18

Yasso9 opened this issue Mar 1, 2024 · 1 comment

Comments

@Yasso9
Copy link

Yasso9 commented Mar 1, 2024

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 :

Screenshot from 2024-03-01 12-03-42

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?
@Yasso9
Copy link
Author

Yasso9 commented Mar 1, 2024

Is having this sufficient inside the defineWebSocketHandler object ?

upgrade(req) {
  return {
    headers: {
      "sec-websocket-extensions": "permessage-deflate",
    },
  };
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant