Pass verifyClient result to `connection` event
Author: pwnallCreated Oct 16, 2014Updated Jan 13, 2026
I'm doing some expensive work in verifyClient and I'd like to reuse the result in the connection event handler.
I'm currently using the fact that the undocumented WebSocket property upgradeReq is the same request as info.req in verifyClient, and I'm modifying the request. This feels dirty though.
Will you please consider allowing any truthy verifyClient result, and passing it into the connection event handler?
If this seems reasonable, I'd be glad to prepare a pull request.
Source: websockets/ws