Closed viesti closed 3 years ago
Merging manually, thanks Kimmo!
Thank you! Actually, I ended up doing the check in a middleware that is wrapped around the handlers that sente creates, since I used that middleware elsewhere too. That lead me to think if csrf, or other checks could be delegated to a middleware, maybe then documented also in sente.
Anyway, this fix is a good thing to keep :)
The documentation on
make-channel-socket-server!
says:But the implementation doesn't actually pass
ring-req
argument to the suppliedauthorized?-fn
function. So fixed that by adding the missing argument to the function call :).