Open poisson-fish opened 2 years ago
@udidifier maybe a fork is needed? @TerminalWitchcraft seems to be not active anymore?
This looks good, hope a fork is not needed, let's see if @TerminalWitchcraft wake up :), otherwise happy to support the fork.
Or maybe is possible to handle over the crates.io crate
This PR looks good to me, just needs changing to the actual actix 4 release version.
~~But if the crate is dead as a whole I think I'm going to look at moving to the actix-limitation which seems to be an officially maintained actix crate: https://github.com/actix/actix-extras/tree/master/actix-limitation~~ Or maybe not, it looks incredibly lacking in functionality :(
Yep,
I was thinking about it, anyway I think we can port some functionality there and give up on this one, for myself i use the "memorystore" for the rate limiting, that should be seamless to port, and not add a big burden in maintenance, not sure about other implementations that require additional external server like memcache.
Regards
@tglman For me the major issue with actix_limitation is as far as I can see there doesn't seem to be any way of providing your own function to retrieve the rate-limiting key from a request - instead it forces you to use cookies which is completely in-appropriate for my use case
@tglman I have had a go at writing my own rate limiter that works with actix web 4: https://github.com/jacob-pro/actix-extensible-rate-limit Maybe it might be useful to you?
@jacob-pro saw it, trying to use it !
Compiles, no warnings, seems to work fine. Updated deps and migrated failure crate to thiserror. Redis store crate is untouched and requires more work. Don't hesitate to let me know if there's problems.