Closed alexgleason closed 3 months ago
@alexgleason is attempting to deploy a commit to the rhinobase Team on Vercel.
A member of the Team first needs to authorize it.
I'm thinking I might not actually go this path. I keep hitting walls, eg https://github.com/honojs/hono/issues/2997
This file is only like 100 lines of code, and I have added more code than that trying to adapt my existing controllers (which use Deno.upgradeWebsocket
) to use Hono's helper, and then fit them into the right shape to call the limiter on it.
Instead I'm thinking I'll create another version that's similar, but it directly wraps a standard WebSocket object (which Deno uses to represent connections on the server side) and add a message event listener to it. Aside from that it will still take a Store and match the conventions of this library.
That being said, I still think this MR is an improvement. So, up to you.
Since the limiter is defined above the controller, there's not a convenient way to access the Hono context unless we pass it in. I need it in the
skip
function, but it seems reasonable that it should be passed into the handler as well.