tower-governor
tower-governor copied to clipboard
Is there a way to get the request body in the KeyExtractor?
Protecting other routes was very easy thanks to this crate, however I am really struggling with protecting my login route by using the login parameter in addition to IP. This parameter is passed in the request body.
I cannot find a way to get the body of a Request<T>
. The body ends up being of type T
, and trait KeyExtractor
enforces that signature. I believe trying to enforce stricter trait bounds in a function and calling that wouldn't work anyway, so this is likely a dead end.
This issue exceeds my rust abilities at this point, can you/someone perhaps give me a point in the right direction? Thanks!