Disable default namespace #4973
-
I'm currently trying to migrate from a custom websocket implementation to socket.io. My question is very simple: since I don't need it, what's the best way to completely disable the default namespace? Middleware that always calls |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi! Yes, I think always calling io.use((_, next) => next(new Error("unauthorized"))); There is currently no way to properly delete a namespace. |
Beta Was this translation helpful? Give feedback.
Hi! Yes, I think always calling
next(error)
is the best option:There is currently no way to properly delete a namespace.