socket.io-website icon indicating copy to clipboard operation
socket.io-website copied to clipboard

docs: add global middleware section to middlewares page (fixes #4609)

Open tech00exploere opened this issue 5 months ago • 2 comments

Description

The /docs/v4/middlewares/ page only showed middleware examples for the main namespace (/), with no mention of how to apply middleware globally across all namespaces.

This was confusing because the existing how-to guide (/how-to/register-a-global-middleware) already covered this topic but was not discoverable from the main middleware docs page.

Changes

  • Added a new "Applying middleware to all namespaces" section at the bottom of the middlewares page
  • Shows how to use the new_namespace event to register global middleware
  • Includes a caution about namespace registration order
  • Links to the existing how-to guide for additional patterns (manual registration, dynamic namespaces)

Related

Fixes socketio/socket.io#4609

tech00exploere avatar Jun 11 '26 09:06 tech00exploere

@tech00exploere is attempting to deploy a commit to the SocketIO Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jun 11 '26 09:06 vercel[bot]

Hi! Just following up on this PR. Please let me know if there are any changes you'd like me to make. Thanks!

tech00exploere avatar Jul 13 '26 08:07 tech00exploere