Skip to content

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

Open
tech00exploere wants to merge 1 commit into
socketio:mainfrom
tech00exploere:fix/global-middleware-docs
Open

docs: add global middleware section to middlewares page (fixes #4609)#541
tech00exploere wants to merge 1 commit into
socketio:mainfrom
tech00exploere:fix/global-middleware-docs

Conversation

@tech00exploere

Copy link
Copy Markdown

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

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

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

A member of the Team first needs to authorize it.

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

Successfully merging this pull request may close these issues.

Docs: Explain global middlewars in main middleware docs

1 participant