You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use allowRequest and pass error as number (like internal Server.errorMessages but in other range) system throw TypeError exception.
Steps to reproduce (if the current behaviour is a bug)
const server = io(httpServer, {
allowRequest: (req, callback) {
// do some checks
callback(403, false);
},
path: '/socket.io'
})
Expected behaviour
Do not throw exception.
Setup
OS:
browser:
engine.io version:
Other information (e.g. stacktraces, related issues, suggestions how to fix)
TypeError: "string" must be a string, Buffer, or ArrayBuffer\n at Function.byteLength (buffer.js:481:11)\n at abortConnection (\node_modules\engine.io\lib\server.js:507:25)\n at \node_modules\engine.io\lib\server.js:354:7\n at Server.allowRequest ```
The text was updated successfully, but these errors were encountered:
You want to:
Current behaviour
When you use
allowRequest
and pass error as number (like internal Server.errorMessages but in other range) system throwTypeError
exception.Steps to reproduce (if the current behaviour is a bug)
Expected behaviour
Do not throw exception.
Setup
Other information (e.g. stacktraces, related issues, suggestions how to fix)
The text was updated successfully, but these errors were encountered: