Comments (4)
I can work on it if it is approved. Please tell me if I can start working on it or not
from salvo.
I want to know how you plan to implement it. There is already a crate with rate limte. Is it to enhance its functionality?
from salvo.
I will add it to QuotaGetter
, but I think this will affect impl<Key, T> QuotaGetter<Key> for T
I think we should delete it, and let the user implement it for it's quota type
from salvo.
Maybe we need to change RateGuard's verify function, add Response's headers as the second arg:
pub trait RateGuard: Clone + Send + Sync + 'static {
type Quota: Clone + Send + Sync + 'static;
async fn verify(&mut self, quota: &Self::Quota, headers: &mut HeaderMap) -> bool;
}
from salvo.
Related Issues (20)
- oapi 的 QueryParam 不支持 struct类型 HOT 2
- Can we make the `SendTarget` a public trait? HOT 2
- Why is `Service::handle` dose not pass the request local and remote addr to `Service::hyper_handler`?
- could not compile `salvo_core` (lib) - impl Trait` only allowed in function and inherent method return types, not in trait method return types HOT 1
- Cannot override non-schema type HOT 2
- 支持随机端口/support random port
- The https (using rustls or openssl) tls handshake is not 100% successful at high concurrency. HOT 2
- I noticed a massive use of unwrap() in Salvo source code (670 unwrap ) HOT 5
- Consider adding `fastwebsockets` as an option HOT 2
- Rustls backend loads only the first certificate from file HOT 2
- Enhancement Request: More Flexibility in Modifying Responses After Proxying
- 防御慢速HTTP攻击 HOT 2
- [FEATURE] Add default security values HOT 13
- sse stream时,客户端只返回最后的值 HOT 1
- Impossible to import TestClient and ResponseText HOT 3
- Cors on sub routers not working, also with middleware, works manually implemeting options request HOT 6
- The `endpoint` macros documentation should point to the module `endpoint`
- [FEATURE] Easy print of error body
- How to add a header to proxy? HOT 1
- Redirect a PUT HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from salvo.