Skip to content

docs: add middleware packet rejection documentation#5498

Closed
ruguoba wants to merge 1 commit into
socketio:mainfrom
ruguoba:main
Closed

docs: add middleware packet rejection documentation#5498
ruguoba wants to merge 1 commit into
socketio:mainfrom
ruguoba:main

Conversation

@ruguoba
Copy link
Copy Markdown

@ruguoba ruguoba commented May 12, 2026

Description

This PR adds comprehensive documentation for rejecting packets from Socket.IO middleware, addressing #3876.

Changes

  • Added detailed documentation for rejecting packets from middleware
  • Covers basic middleware concepts
  • Explains methods for rejecting packets (return without next, conditional processing, error handling)
  • Provides common use cases:
    • ACL (Access Control List)
    • Rate limiting
    • Input validation
    • Authentication
  • Includes best practices
  • Provides complete working example

Why This Is Needed

The current documentation doesn't explain how to reject or drop packets from middleware without causing errors. This is a common need for:

  • ACL implementations
  • Rate limiting
  • Input validation
  • Security measures

Related Issues

Closes #3876

Testing

This is a documentation-only change. The documentation has been reviewed for accuracy.

This PR adds comprehensive documentation for rejecting packets from Socket.IO middleware, addressing #3876.

Includes:
- Basic middleware concepts
- Methods for rejecting packets
- Common use cases (ACL, rate limiting, validation, authentication)
- Best practices
- Complete example

Closes #3876
@ruguoba ruguoba closed this by deleting the head repository May 13, 2026
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.

Please update documentation to show how to reject a packet from socket middleware

1 participant