socket-controllers
socket-controllers copied to clipboard
control namespaces for middlewares
Description
- fixes https://github.com/typestack/socket-controllers/issues/261
- solution: middlewares now have to e added per namespace, therefore I used the socket.io native .of() with a function filter
- added the possibility to limit usage of middleware by name or regular expression related to the namespace
Checklist
- [x] the pull request title describes what this PR does (not a vague title like
Update index.md
) - [x] the pull request targets the default branch of the repository (
develop
) - [x] the code follows the established code style of the repository
-
npm run prettier:check
passes -
npm run lint:check
passes
-
- [x] tests are added for the changes I made (if any source code was modified)
- [x] documentation added or updated
- [x] I have run the project locally and verified that there are no errors
Fixes
fixes #261
This then has the issue, that on('connection') is no longer being called
See: https://github.com/socketio/socket.io/issues/3082
Thank you for the PR! Could we use the default namespace if no namespace is explicity provided? https://socket.io/docs/v2/namespaces/#default-namespace
This seems to be compatible with the latest version as well.
Closing as this has been resolved in #511
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.