Docs: Explain global middlewars in main middleware docs
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 63.2k
- Forks
- 10.3k
- Avg merge
- 11d 20h
- Merged PRs (30d)
- 2
Description
In 4.1.0 this was added: https://socket.io/blog/socket-io-4-1-0/#emit-an-event-when-a-namespace-is-created
It would be good to add it to be added to https://socket.io/docs/v4/middlewares/, as the examples there only shows how to add middleware to the main namespace.
But I would say one of the most important/common scenarios for middlewares is to add security middleware such as https://github.com/helmetjs/helmet. That should always be added to all namespaces, not just the main namespace.
Could https://socket.io/docs/v4/middlewares/ be updated to reflect this?
(https://socket.io/how-to/register-a-global-middleware mentions this so maybe a link is enough to that page?)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the docs/v4/middlewares/ page and compare it with the linked how-to/register-a-global-middleware page and the 4.1.0 blog entry. Update the middleware documentation so global middleware across namespaces is explained or linked clearly, with the security-middleware use case represented; the page should accurately cover both the main namespace and all namespaces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs, typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100