Open
@thernstig

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://.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?)