fastify / fastify/fastify-websocket

Enhance code re-usability

Open
#208 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
468
Forks
84
PR merge metrics
No merged PRs in 30d

Description

### Prerequisites

- [X] I have written a descriptive issue title
- [X] I have searched existing issues to ensure the feature has not already been requested

### 🚀 Feature Proposal

It seems that it could not be possible to manage the upgrade event in custom way, without re-writing the entire logic.
The cause seems to be the Symbols used to store headers and socketRef into the `rawReq` object (`kWs, kWsHead`)

### Motivation

Code re-usability.
In my case I have to add custom headers on HTTP Upgrade response #204 (`ws` library under the hood, supports it).

### Example

Replace Symbol usage with simple string keys or expose some properties to manage the key name attribute.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.